Ticket #8538: middleware_warnings.patch

File middleware_warnings.patch, 1.3 KB (added by Brantley, 15 years ago)
  • docs/topics/http/middleware.txt

     
    111111object. It could alter the given ``response``, or it could create and return a
    112112brand-new :class:`~django.http. HttpResponse`.
    113113
     114Like ``process_request()`` and ``process_view()`` above, it is important to
     115understand that your middleware will not be called if another middleware
     116object returns a response before you.  But unlike ``process_request()`` and
     117``process_view()`` the classes are applied in reverse order, from the bottom
     118up.  This means classes defined towards the end of
     119:setting:`MIDDLEWARE_CLASSES` will go first.
     120
    114121.. _exception-middleware:
    115122
    116123``process_exception``
     
    127134:class:`~django.http. HttpResponse` object, the response will be returned to
    128135the browser. Otherwise, default exception handling kicks in.
    129136
     137Again, remember that because middelware classes are applied in reverse order
     138for ``process_exception``, classes defined towards the end of
     139:setting:`MIDDLEWARE_CLASSES` will go first, and if any return a
     140response, the middleware classes above it will not be called at all.
     141
    130142``__init__``
    131143------------
    132144
Back to Top