1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.7.x] Added RemoteUserMiddleware to middleware reference page.

Backport of 465980d070 from master
This commit is contained in:
Tim Graham
2014-04-16 07:22:15 -04:00
parent 5672b29d57
commit cb7ee25462
2 changed files with 8 additions and 5 deletions

View File

@@ -27,19 +27,17 @@ use of the ``REMOTE_USER`` value using the ``RemoteUserMiddleware`` and
Configuration
=============
.. class:: django.contrib.auth.middleware.RemoteUserMiddleware
First, you must add the
:class:`django.contrib.auth.middleware.RemoteUserMiddleware` to the
:setting:`MIDDLEWARE_CLASSES` setting **after** the
:class:`django.contrib.auth.middleware.AuthenticationMiddleware`::
MIDDLEWARE_CLASSES = (
...
'...',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.RemoteUserMiddleware',
...
)
'...',
)
Next, you must replace the :class:`~django.contrib.auth.backends.ModelBackend`
with ``RemoteUserBackend`` in the :setting:`AUTHENTICATION_BACKENDS` setting::