Closed GoogleCodeExporter closed 9 years ago
It appears that openidgae has sessions models that stomp on django...
Original comment by aggie...@gmail.com
on 29 Nov 2009 at 5:58
I lose track of what's happening on
appengine_django\sessions\backends\db.py:63. The
session_key is correct as best I can tell (and the datastore only has one
session
entity anyway), but what gets loaded here is an openidgae.models.Session
instead of
appengine_django.sessions.models.Session. I have no idea why, and I'm not sure
how to
tell exactly which it is that's stored in the datastore.
Original comment by aggie...@gmail.com
on 29 Nov 2009 at 6:19
I can run this in the interactive console on /_ah/admin:
from google.appengine.api import users
from appengine_django.sessions.models import Session
s = Session.all().get()
print s.expire_date
The printed results are correct, so now I'm more confused.
Original comment by aggie...@gmail.com
on 29 Nov 2009 at 6:21
The problem does not appear to be with setting a value on the session. The
problem
is that the session object that is retrieved has no expire_date attribute, so
the App
Engine expando model code is raising an error when it tries to read it in the
course
of validating that the session is correct - before the attribute setting code
is even
touched.
How was your session data created? Maybe you have bogus data in your datastore?
Try clearing all your session models via the admin console.
Starting from a clean datastore can you provide a reproducible set of steps to
demonstrate this issue?
Original comment by mattbrow...@gmail.com
on 30 Nov 2009 at 12:46
Ok .. I had the same problem and I figured it out.
It's because you are using this project
http://code.google.com/p/google-app-engine-django-openid/
to implement openid functionality ...
And it creates a model class Session that uses the same datastore table name as
the
regular django Session model, but doesn't set the expire_date attribute.
So as the result - you get records that have no expire_date ....
To fix the issue, I just changed the name of openid's Session class to
OpenIDSession,
and changed the code to reflect the change of class name
(in the openid app Session is created in 2 places in __init__.py).
So now it works ...
Original comment by senad...@gmail.com
on 18 Dec 2009 at 5:42
Thanks a ton! I knew the problem was in the openid project's Session class,
but I
wasn't able to get a simple reproduction of the problem working before I got
busy
again. Thanks for your persistence!
Original comment by aggie...@gmail.com
on 18 Dec 2009 at 3:16
Original comment by mattbrow...@gmail.com
on 4 Jan 2010 at 2:52
Original issue reported on code.google.com by
aggie...@gmail.com
on 29 Nov 2009 at 3:04