Django

Code

Changeset 524

Show
Ignore:
Timestamp:
08/16/05 23:05:42 (3 years ago)
Author:
adrian
Message:

Added 'Session object guidlines' section to docs/sessions.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/sessions.txt

    r523 r524  
    6363You can edit ``request.session`` at any point in your view. You can edit it 
    6464multiple times. 
     65 
     66Session object guidelines 
     67------------------------- 
     68 
     69    * Use normal Python strings as dictionary keys on ``request.session``. This 
     70      is more of a convention than a hard-and-fast rule. 
     71 
     72    * Session dictionary keys that begin with an underscore are reserved for 
     73      internal use by Django. 
     74 
     75    * Don't override ``request.session`` with a new object, and don't access or 
     76      set its attributes. Use it like a Python dictionary. 
    6577 
    6678Examples