google-app-engine

Recursive delete in google app engine

I'm using google app engine with django 1.0.2 (and the django-helper) and wonder how people go about doing recursive delete. Suppose you have a model that's something like this: class Top(BaseModel): pass class Bottom(BaseModel): daddy = db.ReferenceProperty(Top) Now, when I delete an object of type 'Top', I want all the ass...

How do Datastore and App versions work on GAE/J

One can deploy several versions of the same application on GAE/J, but how does GAE/J deal with the fact that different versions can use different Datastore (and possibly incompatible) schemes? Example: Suppose that on version 1 of my application I have a POJO like (I've left out the several details for sake of simplicity): public cla...

ClassCastException when trying to add child to parent in owned one to many. (using jdo on google appengine)

I need some help figuring out what I'm doing wrong here. I am trying to master one to many relationships and running into a roadblock. I tried to modify the Employee and ContactInfo example to do one to many mappings: Everything works if I create both the parent (employee) and child (Contact) and then call makePersistent. But if I try ...

automatically import modules for App Engine interactive console

The interactive console accessible at localhost:8080/_ah/admin is very useful for debugging your App Engine app. I always find myself importing the same modules over and over again, particularly models. I've looked into monkey patching the interactive console to automatically import these models, and I'm stumped. Ideally, I could do ...

Google App Engine: Redirect All URLs

Hi, how do I have to configure the app.yaml file to redirect all urls to a certain url? Example I want http://test.appspot.com/hello or http://test.appspot.com/hello28928723 to redirect to http://domain.com I am only serving static files at the moment. Here is my app.yaml file: application: testapp version: 1 runtime: python api_versio...

Store Binary files on GAE/J + Google DataStore

I'm building application on Google AppEngine with Java (GAE/J) and all my data will be stored in Google DataStore. Now, what if I want to save some binary file, let's say Images (JPG, PNG, etc), DOC, TXT, Video Files how do i deal with these? Or what if i want to stream video files (SWF) where and how should i store those files and when ...

obtain collection_name from parent's key in GAE

is it possible to ask parent for its refered collection_name based on one of its keys, lets say i have a parent db model and its key, can i know ths children who refer to this parent through collection name or otherwise class Parent(db.Model): user = db.UserProperty() class Childs(db.Model): refer = db.ReferenceProperty(Parent,col...

multiple sites with Java App Engine

I'm trying to create a series of sites that all run as one application, but have different designs (to localise them). My idea is to map separate domain names to the one site. E.g: www.mysite1.com maps to www.mysite.appspot.com/mysite1 and www.mysite2.com maps to www.mysite.appspot.com/mysite2 I'm guessing that there must be a url p...

How to delete all datastore in Google App Engine?

Does anyone know how to delete all datastore in Google App Engine? ...

error while uploading project to Google App Engine(python)

2009-06-30 23:36:28,483 ERROR appcfg.py:1272 An unexpected error occurred. Aborting. Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\tools\appcfg.py", line 1250, in DoUpload missing_files = self.Begin() File "C:\Program Files\Google\google_appengine\google\appengine\tools\appcfg....

What is the difference between the Query class and the Gqlquery class in Google App Engine?

Are they just different interfaces to the same underlying query? ...

Is there a python module compatible with Google Apps Engine's new "Tasks"

I'm writing a Python application, that I want to later migrate to GAE. The new "Task Queues" API fulfills a requirement of my app, and I want to simulate it locally until I have the time to migrate the whole thing to GAE. Does anyone know of a compatible module I can run locally? ...

Dozer map Text to String

I'm using GWT and GAE for my project. I'm using data transfer objects and dozer to move data between client and server. Dozer had been working great, but I have some classes that need to store text that is over 500 characters, so I must use com.google.appengine.api.datastore.Text datatype in my server side object, but a regular String i...

Google App Engine datastore does not support operator +

I'm playing with GAE, and need to make a query with something like this: select from models.Post as p where (p.votesUp + p.votesDown > 10) But I get this error: App Engine datastore does not support operator + Which could be a good approach to replace that query? ...

Is this a correct way to return JSON in Python/GAE for parsing in JavaScript?

I am making an API for some AJAX related things in my web app on GAE in Python. After setting the content-type to 'application/json' and accessing my url directly- http://mysite.com/api?method=theMethod&param=firstParam -I am being prompted with a 'save file' dialog box instead of seeing the JSON object displayed. The file contain...

date is added in background while adding time in datastore GAE

3.Why does "jan 1st 1970" gets added in the startime field in datastore when I am doing the below statements? (hour,min) = self.request.get('starttime').split(":") #if either of them is null or empty string then int will throw exception if hour and min : datastoremodel.starttime = datetime.time(int(hour), int(min)) Although when ...

GWT + GAE/J, sending JDO objects through the wire, but how?

Hi I'm having a problem. I would like to create Document object, and I would like to have a user property with com.google.appengine.api.users.User type (on GAE's docs site, they said we should use this object instead of email address or something else, because this object probably will be enchanced to be unique). But now the object can'...

Python Unicode UnicodeEncodeError

Hi, I am having issues with trying to convert an UTF-8 string to unicode. I get the error. UnicodeEncodeError: 'ascii' codec can't encode characters in position 73-75: ordinal not in range(128) I tried wrapping this in a try/except block but then google was giving me a system administrator error which was one line. Can someone sugges...

How to open a file on app engine patch?

I tried to read a file in a view like this: def foo(request): f = open('foo.txt', 'r') data = f.read() return HttpResponse(data) I tried to place the foo.txt in almost every folder in the project but it still returns [Errno 2] No such file or directory: 'foo.txt' So does anybody knows how to open a file in app engi...

Is it bad for performance to have an App Engine expando model with a huge number of properties?

I've been using a pattern in an application where I'm setting arbitrary attributes on Expando class models in an App Engine app. This works as expected, but hasn't yet been tested with a really large data set. And over time, the number of attributes might get to be > 1000. It also makes the table in the administration console scroll fa...