diff --git a/docs/upgrade.rst b/docs/upgrade.rst index d3282487..fcd5f714 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -294,3 +294,9 @@ Alternatively, you can rename your collections eg :: else: 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. diff --git a/mongoengine/django/sessions.py b/mongoengine/django/sessions.py index 85ca25a0..17cae8ad 100644 --- a/mongoengine/django/sessions.py +++ b/mongoengine/django/sessions.py @@ -34,6 +34,9 @@ class MongoSession(Document): meta = {'collection': MONGOENGINE_SESSION_COLLECTION, 'db_alias': MONGOENGINE_SESSION_DB_ALIAS, 'allow_inheritance': False} + + def get_decoded(self): + return SessionStore().decode(self.session_data) class SessionStore(SessionBase):