Sessions are implemented via a piece of middleware. To enable session functionality, edit the MIDDLEWARE_CLASSES
setting and make sure it contains 'django.contrib.sessions.middleware.SessionMiddleware'
. The default settings.py
created by django-admin startproject
has SessionMiddleware
activated.
If you don't want to use sessions, you might as well remove the SessionMiddleware
line from MIDDLEWARE_CLASSES
and 'django.contrib.sessions'
from your INSTALLED_APPS
. It'll save you a small bit of overhead.