From e508625935ceee3c8becc387df7a5c396153dc1a Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 14 Jan 2013 16:37:40 +0000 Subject: [PATCH 1/2] Update docs/upgrade.rst --- docs/upgrade.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 82ac7cac..901c251d 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -183,3 +183,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. From 17eeeb75366ab4625ee5c1a11089aaf9c21fee18 Mon Sep 17 00:00:00 2001 From: lcya86 Date: Thu, 17 Jan 2013 15:31:27 +0800 Subject: [PATCH 2/2] Update mongoengine/django/sessions.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit added theĀ "get_decoded" method to the MongoSession class --- mongoengine/django/sessions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mongoengine/django/sessions.py b/mongoengine/django/sessions.py index 810b6265..8a35e896 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):