Added the "get_decoded" method to the MongoSession class (#216)
This commit is contained in:
parent
03d3c26a99
commit
8c1f8e54cd
3
AUTHORS
3
AUTHORS
@ -138,4 +138,5 @@ that much better:
|
||||
* Manuel Hermann
|
||||
* Gustavo Gawryszewski
|
||||
* Max Countryman
|
||||
* caitifbrito
|
||||
* caitifbrito
|
||||
* lcya86 刘春洋
|
@ -44,6 +44,7 @@ Changes in 0.8.X
|
||||
- Added Django Group and Permission (#142)
|
||||
- Added Doc class and pk to Validation messages (#69)
|
||||
- Fixed Documents deleted via a queryset don't call any signals (#105)
|
||||
- Added the "get_decoded" method to the MongoSession class (#216)
|
||||
|
||||
Changes in 0.7.9
|
||||
================
|
||||
|
@ -298,5 +298,5 @@ Alternatively, you can rename your collections eg ::
|
||||
mongodb 1.8 > 2.0 +
|
||||
===================
|
||||
|
||||
Its been reported that indexes may need to be recreated to the newer version of indexes.
|
||||
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.
|
||||
|
@ -25,6 +25,7 @@ MONGOENGINE_SESSION_DATA_ENCODE = getattr(
|
||||
settings, 'MONGOENGINE_SESSION_DATA_ENCODE',
|
||||
True)
|
||||
|
||||
|
||||
class MongoSession(Document):
|
||||
session_key = fields.StringField(primary_key=True, max_length=40)
|
||||
session_data = fields.StringField() if MONGOENGINE_SESSION_DATA_ENCODE \
|
||||
@ -34,7 +35,7 @@ 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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user