From 41511cc3bdde3ec304134f1e82210c8b4d4872f3 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 13 Jan 2006 03:53:45 +0000 Subject: [PATCH] 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 --- django/conf/global_settings.py | 2 +- django/contrib/admin/views/decorators.py | 2 +- docs/i18n.txt | 2 +- docs/settings.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 5185850d01..c76857e4b6 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -193,7 +193,7 @@ TIME_FORMAT = 'P' # this middleware classes will be applied in the order given, and in the # response phase the middleware will be applied in reverse order. MIDDLEWARE_CLASSES = ( - "django.middleware.sessions.SessionMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", # "django.middleware.http.ConditionalGetMiddleware", # "django.middleware.gzip.GZipMiddleware", "django.middleware.common.CommonMiddleware", diff --git a/django/contrib/admin/views/decorators.py b/django/contrib/admin/views/decorators.py index 2415ac44ea..5e74bfb217 100644 --- a/django/contrib/admin/views/decorators.py +++ b/django/contrib/admin/views/decorators.py @@ -49,7 +49,7 @@ def staff_member_required(view_func): # The user is valid. Continue to the admin page. 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 not request.POST.has_key(LOGIN_FORM_KEY): diff --git a/docs/i18n.txt b/docs/i18n.txt index 6e83158b97..9a3566edf9 100644 --- a/docs/i18n.txt +++ b/docs/i18n.txt @@ -404,7 +404,7 @@ should follow these guidelines: For example, your ``MIDDLEWARE_CLASSES`` might look like this:: MIDDLEWARE_CLASSES = ( - 'django.middleware.sessions.SessionMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', ) diff --git a/docs/settings.txt b/docs/settings.txt index ddc018b5e9..60e75f7969 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -463,7 +463,7 @@ MIDDLEWARE_CLASSES Default:: - ("django.middleware.sessions.SessionMiddleware", + ("django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.doc.XViewMiddleware")