Opened 18 years ago
Closed 18 years ago
#4324 closed (wontfix)
Middleware order matters.
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | Middleware order | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It is clearly stated that the order, in which middlewares are added, is important, but nowhere to find in the doc what is the correct order. I have to go though all documentation in order to asure myself that I haven't broken anything.
I think page http://www.djangoproject.com/documentation/middleware/ lacks an example with MIDDLEWARE_CLASSES set to the list of middlewares, but ALL middlewares are specified in appropriate order, including django.contribs. Then, any one can get what the order should be, by looking at it.
Though the order is worth thinking about, there isn't one "standard" order. The documentation for each middleware explains how early it needs to be, and from there it doesn't really matter. We don't want to make it appear that there's only a single order allowed; that would obfuscate the meaning of the ordering.