diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-12-29 19:17:32 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-12-29 19:17:32 +0000 |
| commit | f7f812cd7087625266f69596fb914a919bc798ae (patch) | |
| tree | 7a6ad09a05aad59368af826be73f24fa359d5239 /django | |
| parent | 632914f1887ecc3e0a2499a7ba257e1575c7b74e (diff) | |
Fixed #1137 -- Added a _contains_() method to SessionWrapper. Thanks, Brant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1793 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/middleware/sessions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/middleware/sessions.py b/django/middleware/sessions.py index df7473e904..545ee38fa8 100644 --- a/django/middleware/sessions.py +++ b/django/middleware/sessions.py @@ -11,6 +11,9 @@ class SessionWrapper(object): self.session_key = session_key self.modified = False + def __contains__(self, key): + return key in self._session + def __getitem__(self, key): return self._session[key] |
