diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-07-07 22:25:32 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-07-07 22:25:32 +0000 |
| commit | 5f33157f6293afddff8bc0e68d3b06e7bf538a74 (patch) | |
| tree | 6ef35a9c0bc32349d096bf04ecff9d7c02234d3e /docs | |
| parent | df4331f3e99572e1816576ae1563b452af67ce3a (diff) | |
Fixed #2295 -- Improved docs/sessions.txt to note INSTALLED_APPS requirement.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/sessions.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/sessions.txt b/docs/sessions.txt index 2dba491159..c473d0a3db 100644 --- a/docs/sessions.txt +++ b/docs/sessions.txt @@ -10,18 +10,22 @@ Cookies contain a session ID -- not the data itself. Enabling sessions ================= -Sessions are implemented via middleware_. +Sessions are implemented via a piece of middleware_ and a Django model. -Turn session functionality on and off by editing the ``MIDDLEWARE_CLASSES`` -setting. To activate sessions, make sure ``MIDDLEWARE_CLASSES`` contains -``'django.contrib.sessions.middleware.SessionMiddleware'``. +To enable session functionality, do these two things: -The default ``settings.py`` created by ``django-admin.py startproject`` has -``SessionMiddleware`` activated. + * Edit the ``MIDDLEWARE_CLASSES`` setting and make sure + ``MIDDLEWARE_CLASSES`` contains ``'django.contrib.sessions.middleware.SessionMiddleware'``. + The default ``settings.py`` created by ``django-admin.py startproject`` has + ``SessionMiddleware`` activated. + + * Add ``'django.contrib.sessions'`` to your ``INSTALLED_APPS`` setting, and + run ``manage.py syncdb`` to install the single database table that stores + session data. If you don't want to use sessions, you might as well remove the -``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES``. It'll save you a small -bit of overhead. +``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES`` and ``'django.contrib.sessions'`` +from your ``INSTALLED_APPS``. It'll save you a small bit of overhead. .. _middleware: http://www.djangoproject.com/documentation/middleware/ |
