From 1f6b3cf145fc1057f478607c2c845e66efaaf546 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 22 May 2014 17:08:32 +0200 Subject: [1.7.x] Fixed #20816 -- Added hints about Django middleware ordering Thanks gthb Trac user for the report, kolypto StackOverflow user for the initial list and Tim Graham for the review. Backport of 756c390fb5 from master. --- docs/topics/http/middleware.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/topics/http') diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index b18573f002..a2b71dc664 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -45,7 +45,9 @@ The order in :setting:`MIDDLEWARE_CLASSES` matters because a middleware can depend on other middleware. For instance, :class:`~django.contrib.auth.middleware.AuthenticationMiddleware` stores the authenticated user in the session; therefore, it must run after -:class:`~django.contrib.sessions.middleware.SessionMiddleware`. +:class:`~django.contrib.sessions.middleware.SessionMiddleware`. See +:ref:`middleware-ordering` for some common hints about ordering of Django +middleware classes. Hooks and application order =========================== -- cgit v1.3