Skip to content

Commit

Permalink
Fixed #20997 -- Added SessionStore note to docs.
Browse files Browse the repository at this point in the history
Thanks jsdalton.
  • Loading branch information
timgraham committed Aug 29, 2013
1 parent d72f83c commit be48c6c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/topics/http/sessions.txt
Expand Up @@ -454,6 +454,17 @@ Here's a typical usage example::
Using sessions out of views Using sessions out of views
=========================== ===========================


.. note::

The examples in this section import the ``SessionStore`` object directly
from the ``django.contrib.sessions.backends.db`` backend. In your own code,
you should consider importing ``SessionStore`` from the session engine
designated by :setting:`SESSION_ENGINE`, as below:

>>> from importlib import import_module
>>> from django.conf import settings
>>> SessionStore = import_module(settings.SESSION_ENGINE).SessionStore

An API is available to manipulate session data outside of a view:: An API is available to manipulate session data outside of a view::


>>> from django.contrib.sessions.backends.db import SessionStore >>> from django.contrib.sessions.backends.db import SessionStore
Expand Down

0 comments on commit be48c6c

Please sign in to comment.