If I have two tables, Customers and Orders, and I want to look up the latest order for a customer, how would I do this on Google App Engine using GQL?
Normally, I would join these two tables through the foreign key, customer_id, which exists in the orders table.
select orders.* from customers, orders
where customers.customer_id = ord...
In GAE, I have a model called Foo, with existing entities, and attempt to add a new property called memcached to Foo that takes datetime values for the last time this value was set to memcache. If I try to query and sort on this property, or even filter for entities that do not have a value for memcached, entities that haven't had a val...
I'm just getting started with a project that combines GWT, Google App Engine and the Google Eclipse plugin. Where is the best place to store my tests? I normally keep my code organized Maven-style, with src/main/java, and tests in src/test/java. The default setup I get from the plugin dumped my source directly into src, which I'm not ...
My application is on GAE and I'm trying to figure out how to prevent hotlinking of images dynamically served (e.g. /image?id=E23432E) in Python. Please advise.
...
My Google app engine application needs to send out email(what ever we get the data from screen). On development server i specify my smtp configuration (host,port,user,password) while starting the server. then I am running my application in that form after I submitted the data its showing error as
**Traceback (most recent call last):
...
This is applicable to Google App Engine, but not necessarily constrained for it.
On Google App Engine, the database isn't relational, so no aggregate functions (such as sum, average etc) can be implemented. Each row is independent of each other. To calculate sum and average, the app simply has to amortize its calculation by recalculatin...
Hi,
I have a Django model created for Google's App Engine,
Model A():
propA = ReferenceProperty(B)
Model B():
propB = ReferenceProperty(C)
Model C():
propC = ReferenceProperty(B)
I have written custom Django serializer which will fetch the data for the ReferenceProperty(s) and serialize that along the initial model.
The prob...
I'm trying to implement something like Rails dynamic-finders in Python (for
webapp/GAE). The dynamic finders work like this:
Your Person has some fields: name, age and email.
Suppose you want to find all the users whose name is "Robot".
The Person class has a method called "find_by_name" that receives the name
and returns the result...
For some reason, I was under the impression that it was just called Timeout, but it doesn't seem to be.
Thanks!
...
I was doing some beginner AppEngine dev on a Windows box and installed Eclipse for that. I liked the autocompletion I got with the objects and functions.
I moved my dev environment over to my Macbook, and installed Eclipse Ganymede. I installed the AppEngine SDK and Eclipse plug in. However, when I am typing out code now, the autocom...
Im checking the examples google gives on how to start using python; especifically the code posted here; http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html
The thing that i want to lean is that, here:
class Guestbook(webapp.RequestHandler):
def post(self):
greeting = Greeting()
if users.get_curren...
I am trying to query the google datastore for something like (with pm --> persistanceManager):
String filters = "( field == 'value' || field == 'anotherValue' )";
Query query = pm.newQuery(myType.class, filters);
When I execute - I am getting back: App Engine datastore does not support operator OR.
What's the best approach in peop...
I have a possible solution to a problem I'm trying to address, but I wanted to run it by here just to be on the safe side. The challenge is to ensure that a user that has gone through some test questions in an exam application doesn't encounter them again during a subsequent test.
I'm not using a SQL database, which would allow me to u...
On this question I solved the problem of querying Google Datastore to retrieve stuff by user (com.google.appengine.api.users.User) like this:
User user = userService.getCurrentUser();
String select_query = "select from " + Greeting.class.getName();
Query query = pm.newQuery(select_query);
query.setFilter("author == paramAuthor");
que...
One can easily use JDO syntax to query on multiple parameters as follows:
//specify the persistent entity you're querying and you filter usign params
query = pm.newQuery(MyClass.class, " customer == paramCustomer && date >= paramStartDate && date <=paramEndDate ");
// declare params used above
query.declareParameters("com.google.appeng...
Hello all,
In a classic relational database, I have the following table:
CREATE TABLE Person(
Id int IDENTITY(1,1) NOT NULL PRIMARY KEY,
MotherId int NOT NULL REFERENCES Person(Id),
FatherId int NOT NULL REFERENCES Person(Id),
FirstName nvarchar(255))
I am trying to convert this table into a Google App Engine table. ...
I'm trying to get a sense of how to implement the user/role relationships for an application I'm writing. The persistence layer is Google App Engine's datastore, which places some interesting (but generally beneficial) constraints on what can be done. Any thoughts are appreciated.
It might be helpful to keep things very concrete. I wo...
Hi,
I have my first app, not that big, but it is the first step. (next big one on the way)
Now if I want to put it on my own Linode VPS, I have to configure mod_python or mod_wsgi, as well as memcache, Ngix, mySQL or Postgresql, etc. to make it work. If I put it GAE, All I have to do is convert the models to use GAE's API.
What I like...
I basically have the classic many to many model. A user, an award, and a "many-to-many" table mapping between users and awards.
Each user has on the order of 400 awards and each award is given to about 1/2 the users.
I want to iterate over all of the user's awards and sum up their points. In SQL it would be a table join between the ma...
Specifically, are there any libraries that do not use sockets?
I will be running this code in Google App Engine, which does not allow the use of sockets.
Google app engine does allow the use of urllib2 to make web requests.
I've been trying to get mechanize to work, since that what I've used before, but if there's something easier, I'd...