magic-removal: Updated docs to reflect new location of session middleware
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b2e4952f02
commit
41511cc3bd
|
@ -193,7 +193,7 @@ TIME_FORMAT = 'P'
|
||||||
# this middleware classes will be applied in the order given, and in the
|
# this middleware classes will be applied in the order given, and in the
|
||||||
# response phase the middleware will be applied in reverse order.
|
# response phase the middleware will be applied in reverse order.
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
"django.middleware.sessions.SessionMiddleware",
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
# "django.middleware.http.ConditionalGetMiddleware",
|
# "django.middleware.http.ConditionalGetMiddleware",
|
||||||
# "django.middleware.gzip.GZipMiddleware",
|
# "django.middleware.gzip.GZipMiddleware",
|
||||||
"django.middleware.common.CommonMiddleware",
|
"django.middleware.common.CommonMiddleware",
|
||||||
|
|
|
@ -49,7 +49,7 @@ def staff_member_required(view_func):
|
||||||
# The user is valid. Continue to the admin page.
|
# The user is valid. Continue to the admin page.
|
||||||
return view_func(request, *args, **kwargs)
|
return view_func(request, *args, **kwargs)
|
||||||
|
|
||||||
assert hasattr(request, 'session'), "The Django admin requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.middleware.sessions.SessionMiddleware'."
|
assert hasattr(request, 'session'), "The Django admin requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'."
|
||||||
|
|
||||||
# If this isn't already the login page, display it.
|
# If this isn't already the login page, display it.
|
||||||
if not request.POST.has_key(LOGIN_FORM_KEY):
|
if not request.POST.has_key(LOGIN_FORM_KEY):
|
||||||
|
|
|
@ -404,7 +404,7 @@ should follow these guidelines:
|
||||||
For example, your ``MIDDLEWARE_CLASSES`` might look like this::
|
For example, your ``MIDDLEWARE_CLASSES`` might look like this::
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
'django.middleware.sessions.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.locale.LocaleMiddleware',
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
)
|
)
|
||||||
|
|
|
@ -463,7 +463,7 @@ MIDDLEWARE_CLASSES
|
||||||
|
|
||||||
Default::
|
Default::
|
||||||
|
|
||||||
("django.middleware.sessions.SessionMiddleware",
|
("django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
"django.middleware.common.CommonMiddleware",
|
"django.middleware.common.CommonMiddleware",
|
||||||
"django.middleware.doc.XViewMiddleware")
|
"django.middleware.doc.XViewMiddleware")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue