Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2295 -- Improved docs/sessions.txt to note INSTALLED_APPS requ…

…irement.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5f33157f6293afddff8bc0e68d3b06e7bf538a74 1 parent df4331f
Adrian Holovaty authored July 07, 2006

Showing 1 changed file with 12 additions and 8 deletions. Show diff stats Hide diff stats

  1. 20  docs/sessions.txt
20  docs/sessions.txt
@@ -10,18 +10,22 @@ Cookies contain a session ID -- not the data itself.
10 10
 Enabling sessions
11 11
 =================
12 12
 
13  
-Sessions are implemented via middleware_.
  13
+Sessions are implemented via a piece of middleware_ and a Django model.
14 14
 
15  
-Turn session functionality on and off by editing the ``MIDDLEWARE_CLASSES``
16  
-setting. To activate sessions, make sure ``MIDDLEWARE_CLASSES`` contains
17  
-``'django.contrib.sessions.middleware.SessionMiddleware'``.
  15
+To enable session functionality, do these two things:
18 16
 
19  
-The default ``settings.py`` created by ``django-admin.py startproject`` has
20  
-``SessionMiddleware`` activated.
  17
+    * Edit the ``MIDDLEWARE_CLASSES`` setting and make sure
  18
+      ``MIDDLEWARE_CLASSES`` contains ``'django.contrib.sessions.middleware.SessionMiddleware'``.
  19
+      The default ``settings.py`` created by ``django-admin.py startproject`` has
  20
+      ``SessionMiddleware`` activated.
  21
+
  22
+    * Add ``'django.contrib.sessions'`` to your ``INSTALLED_APPS`` setting, and
  23
+      run ``manage.py syncdb`` to install the single database table that stores
  24
+      session data.
21 25
 
22 26
 If you don't want to use sessions, you might as well remove the
23  
-``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES``. It'll save you a small
24  
-bit of overhead.
  27
+``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES`` and ``'django.contrib.sessions'``
  28
+from your ``INSTALLED_APPS``. It'll save you a small bit of overhead.
25 29
 
26 30
 .. _middleware: http://www.djangoproject.com/documentation/middleware/
27 31
 

0 notes on commit 5f33157

Please sign in to comment.
Something went wrong with that request. Please try again.