Merge branch 'patch-1' of https://github.com/lcya86/mongoengine into 0.8

This commit is contained in:
Ross Lawley 2013-01-28 14:09:51 +00:00
commit 03d3c26a99
2 changed files with 9 additions and 0 deletions

View File

@ -294,3 +294,9 @@ Alternatively, you can rename your collections eg ::
else: else:
print "Upgraded collection names" print "Upgraded collection names"
mongodb 1.8 > 2.0 +
===================
Its been reported that indexes may need to be recreated to the newer version of indexes.
To do this drop indexes and call ``ensure_indexes`` on each model.

View File

@ -35,6 +35,9 @@ class MongoSession(Document):
'db_alias': MONGOENGINE_SESSION_DB_ALIAS, 'db_alias': MONGOENGINE_SESSION_DB_ALIAS,
'allow_inheritance': False} 'allow_inheritance': False}
def get_decoded(self):
return SessionStore().decode(self.session_data)
class SessionStore(SessionBase): class SessionStore(SessionBase):
"""A MongoEngine-based session store for Django. """A MongoEngine-based session store for Django.