summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authormlavin <markdlavin@gmail.com>2014-04-20 08:58:29 -0400
committerTim Graham <timograham@gmail.com>2014-06-13 12:40:42 -0400
commitd94de802d34c858805a01d3c699799aebc247ec3 (patch)
treee6a99c7b37a052a9ebb6820f59f251357a573c72 /docs
parentd3bf537324c1164dee45070f90d48661b27a781f (diff)
[1.7.x] Fixed #22477 -- Removed contrib middleware from the global settings defaults.
Also added a compatibility check for changed middleware defaults.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/settings.txt12
-rw-r--r--docs/releases/1.7.txt23
2 files changed, 31 insertions, 4 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index ac23194141..b4b432149b 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -1749,13 +1749,17 @@ MIDDLEWARE_CLASSES
Default::
('django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',)
+ 'django.middleware.csrf.CsrfViewMiddleware',)
A tuple of middleware classes to use. See :doc:`/topics/http/middleware`.
+.. versionchanged:: 1.7
+
+ :class:`~django.contrib.sessions.middleware.SessionMiddleware`,
+ :class:`~django.contrib.auth.middleware.AuthenticationMiddleware`, and
+ :class:`~django.contrib.messages.middleware.MessageMiddleware` were removed
+ from this setting.
+
.. setting:: MIGRATION_MODULES
MIGRATION_MODULES
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index f970d40819..9a02fc0428 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -68,6 +68,8 @@ but a few of the key features are:
inside ``TransactionTestCase`` :ref:`unless specifically requested
<test-case-serialized-rollback>`.
+.. _app-loading-refactor-17-release-note:
+
App-loading refactor
~~~~~~~~~~~~~~~~~~~~
@@ -1114,6 +1116,27 @@ in a test class which is a subclass of
:class:`~django.test.TransactionTestCase` rather than
:class:`~django.test.TestCase`.
+Contrib middleware removed from default :setting:`MIDDLEWARE_CLASSES`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The :ref:`app-loading refactor <app-loading-refactor-17-release-note>`
+deprecated using models from apps which are not part of the
+:setting:`INSTALLED_APPS` setting. This exposed an incompatibility between
+the default :setting:`INSTALLED_APPS` and :setting:`MIDDLEWARE_CLASSES` in the
+global defaults (``django.conf.global_settings``). To bring these settings in
+sync and prevent deprecation warnings when doing things like testing reusable
+apps with minimal settings,
+:class:`~django.contrib.sessions.middleware.SessionMiddleware`,
+:class:`~django.contrib.auth.middleware.AuthenticationMiddleware`, and
+:class:`~django.contrib.messages.middleware.MessageMiddleware` were removed
+from the defaults. These classes will still be included in the default settings
+generated by :djadmin:`startproject`. Most projects will not be affected by
+this change but if you were not previously declaring the
+:setting:`MIDDLEWARE_CLASSES` in your project settings and relying on the
+global default you should ensure that the new defaults are in line with your
+project's needs. You should also check for any code that accesses
+``django.conf.global_settings.MIDDLEWARE_CLASSES`` directly.
+
Miscellaneous
~~~~~~~~~~~~~