Ticket #20997: update_contrib_sessions_docs.v1.diff

File update_contrib_sessions_docs.v1.diff, 908 bytes (added by Jim Dalton, 11 years ago)
  • docs/topics/http/sessions.txt

    diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
    index 24b9ef4..228e5ad 100644
    a b Here's a typical usage example::  
    454454Using sessions out of views
    455455===========================
    456456
     457.. note::
     458
     459    The examples in this section import the ``SessionStore`` object directly from
     460    the ``django.contrib.sessions.backends.db`` backend. In your own code, you
     461    should consider importing ``SessionStore`` from the session engine designated
     462    by :setting:`SESSION_ENGINE`, as below:
     463
     464      >>> from importlib import import_module
     465      >>> from django.conf import settings
     466      >>> SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
     467
    457468An API is available to manipulate session data outside of a view::
    458469
    459470    >>> from django.contrib.sessions.backends.db import SessionStore
Back to Top