views:

43

answers:

1

Is there a way for me to get sessions working? I know Django has built in session management, and GAE has some tools for it if you're using their watered down version of Django 0.96, but is there a way to get sessions to work if you're trying to use GAE w/ Django 1.1 (i.e. use_library() call). I assume using a db-backed session doesn't work, and a file system backed one won't work b/c we don't have access to the filesystem if we deploy to the Google production servers.

This kinda worked (as in didn't crap out) when I used SessionMiddleware backed by a local-memory backed cache and a non-persistent cache (i.e. setting SESSION_ENGINE to django.contrib.sessions.backends.cache). But the session never seems to persist in this case, no matter how I set the timeouts. A new session key is generated on every page reload. Maybe this is b/c the GAE assumes complete statelessness with each request and blows away my local cache?

Apologies in advance, I'm pretty new to Python. Any suggestions would be greatly appreciated.

+1  A: 

If you want to use the django sessions, you need to use the google django helper here: http://code.google.com/p/google-app-engine-django/

Which says:

Support for the db and cache session backed modules when using Django 1.0 alpha

Even though it says 1.0 alpha, it means 1.0 and above.

dar