Remove SessionAuthenticationMiddleware from project template and docs.

The project template assumes Django 1.11, where SessionAuthenticationMiddleware is redundant (see https://docs.djangoproject.com/en/1.11/releases/1.10/#features-removed-in-1-10).

Also update the documentation to consistently refer to MIDDLEWARE instead of MIDDLEWARE_CLASSES.
pull/3869/merge
Samir Shah 2017-09-19 10:08:07 +03:00 zatwierdzone przez Matt Westcott
rodzic 63af2b28ea
commit 62b8caedd5
8 zmienionych plików z 8 dodań i 9 usunięć

Wyświetl plik

@ -25,6 +25,7 @@ Changelog
* Fix: Fixed Node build scripts to work on Windows (Mikalai Radchuk)
* Fix: Stop breadcrumb home icon from showing as ellipsis in Chrome 60 (Matt Westcott)
* Fix: Prevent `USE_THOUSAND_SEPARATOR = True` from breaking the image focal point chooser (Sævar Öfjörð Magnússon)
* Fix: Removed deprecated `SessionAuthenticationMiddleware` from project template (Samir Shah)
1.12.2 (18.09.2017)

Wyświetl plik

@ -255,6 +255,7 @@ Contributors
* Ben Sturmfels
* Anselm Bradford
* Mads Jensen
* Samir Shah
Translators
===========

Wyświetl plik

@ -53,11 +53,11 @@ Enabling multiple language support
Firstly, make sure the `USE_I18N <https://docs.djangoproject.com/en/1.8/ref/settings/#use-i18n>`_ Django setting is set to ``True``.
To enable multi-language support, add ``django.middleware.locale.LocaleMiddleware`` to your ``MIDDLEWARE_CLASSES``:
To enable multi-language support, add ``django.middleware.locale.LocaleMiddleware`` to your ``MIDDLEWARE``:
.. code-block:: python
MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
...
'django.middleware.locale.LocaleMiddleware',

Wyświetl plik

@ -28,12 +28,11 @@ Middleware (``settings.py``)
.. code-block:: python
MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
@ -520,12 +519,11 @@ These two files should reside in your project directory (``myproject/myproject/`
]
MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',

Wyświetl plik

@ -35,7 +35,7 @@ In your settings file, add the following apps to ``INSTALLED_APPS``:
'modelcluster',
'taggit',
Add the following entries to ``MIDDLEWARE_CLASSES``:
Add the following entries to ``MIDDLEWARE``:
.. code-block:: python

Wyświetl plik

@ -39,6 +39,7 @@ Bug fixes
* Fixed Node build scripts to work on Windows (Mikalai Radchuk)
* Stop breadcrumb home icon from showing as ellipsis in Chrome 60 (Matt Westcott)
* Prevent ``USE_THOUSAND_SEPARATOR = True`` from breaking the image focal point chooser (Sævar Öfjörð Magnússon)
* Removed deprecated ``SessionAuthenticationMiddleware`` from project template (Samir Shah)
Upgrade considerations
======================

Wyświetl plik

@ -57,7 +57,6 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',

Wyświetl plik

@ -94,7 +94,6 @@ if django.VERSION >= (1, 10):
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',