diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-08-17 04:05:42 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-08-17 04:05:42 +0000 |
| commit | 99d8bb34fe034161c9f6ca7587a0f8b87a2f1236 (patch) | |
| tree | 250e525e5552b74336151ddc50233a56cbefbcf6 /docs/sessions.txt | |
| parent | 21c4526557fb50b9b62f32065c7d3952ea35c5df (diff) | |
Added 'Session object guidlines' section to docs/sessions.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/sessions.txt')
| -rw-r--r-- | docs/sessions.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/sessions.txt b/docs/sessions.txt index 2566a9f70e..ad715767ca 100644 --- a/docs/sessions.txt +++ b/docs/sessions.txt @@ -63,6 +63,18 @@ It also has these two methods: You can edit ``request.session`` at any point in your view. You can edit it multiple times. +Session object guidelines +------------------------- + + * Use normal Python strings as dictionary keys on ``request.session``. This + is more of a convention than a hard-and-fast rule. + + * Session dictionary keys that begin with an underscore are reserved for + internal use by Django. + + * Don't override ``request.session`` with a new object, and don't access or + set its attributes. Use it like a Python dictionary. + Examples -------- |
