Ticket #8538: middleware_warnings.patch
File middleware_warnings.patch, 1.3 KB (added by , 16 years ago) |
---|
-
docs/topics/http/middleware.txt
111 111 object. It could alter the given ``response``, or it could create and return a 112 112 brand-new :class:`~django.http. HttpResponse`. 113 113 114 Like ``process_request()`` and ``process_view()`` above, it is important to 115 understand that your middleware will not be called if another middleware 116 object returns a response before you. But unlike ``process_request()`` and 117 ``process_view()`` the classes are applied in reverse order, from the bottom 118 up. This means classes defined towards the end of 119 :setting:`MIDDLEWARE_CLASSES` will go first. 120 114 121 .. _exception-middleware: 115 122 116 123 ``process_exception`` … … 127 134 :class:`~django.http. HttpResponse` object, the response will be returned to 128 135 the browser. Otherwise, default exception handling kicks in. 129 136 137 Again, remember that because middelware classes are applied in reverse order 138 for ``process_exception``, classes defined towards the end of 139 :setting:`MIDDLEWARE_CLASSES` will go first, and if any return a 140 response, the middleware classes above it will not be called at all. 141 130 142 ``__init__`` 131 143 ------------ 132 144