Ticket #5544: 5544.diff

File 5544.diff, 999 bytes (added by Adam Vandenberg, 17 years ago)
  • docs/sessions.txt

     
    198198
    199199An API is available to manipulate session data outside of a view::
    200200
    201     >>> from django.contrib.sessions.engines.db import SessionStore
     201    >>> from django.contrib.sessions.backends.db import SessionStore
    202202    >>> s = SessionStore(session_key='2b1189a188b44ad18c35e113ac6ceead')
    203203    >>> s['last_login'] = datetime.datetime(2005, 8, 20, 13, 35, 10)
    204204    >>> s['last_login']
    205205    datetime.datetime(2005, 8, 20, 13, 35, 0)
    206206    >>> s.save()
    207207
    208 If you're using the ``django.contrib.sessions.engine.db`` backend, each
     208If you're using the ``django.contrib.sessions.backends.db`` backend, each
    209209session is just a normal Django model. The ``Session`` model is defined in
    210210``django/contrib/sessions/models.py``. Because it's a normal model, you can
    211211access sessions using the normal Django database API::
Back to Top