Fixed #5013 -- Corrected the documentation about which how further middleware
processing is done after request or view middleware returns something. Thanks, Jason Yan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4c3586582d
commit
d79c6a0125
1
AUTHORS
1
AUTHORS
|
@ -329,6 +329,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
Jakub Wiśniowski <restless.being@gmail.com>
|
Jakub Wiśniowski <restless.being@gmail.com>
|
||||||
Maciej Wiśniowski <pigletto@gmail.com>
|
Maciej Wiśniowski <pigletto@gmail.com>
|
||||||
wojtek
|
wojtek
|
||||||
|
Jason Yan <tailofthesun@gmail.com>
|
||||||
ye7cakf02@sneakemail.com
|
ye7cakf02@sneakemail.com
|
||||||
ymasuda@ethercube.com
|
ymasuda@ethercube.com
|
||||||
Jarek Zgoda <jarek.zgoda@gmail.com>
|
Jarek Zgoda <jarek.zgoda@gmail.com>
|
||||||
|
|
|
@ -178,8 +178,9 @@ request, before Django decides which view to execute.
|
||||||
``process_request()`` should return either ``None`` or an ``HttpResponse``
|
``process_request()`` should return either ``None`` or an ``HttpResponse``
|
||||||
object. If it returns ``None``, Django will continue processing this request,
|
object. If it returns ``None``, Django will continue processing this request,
|
||||||
executing any other middleware and, then, the appropriate view. If it returns
|
executing any other middleware and, then, the appropriate view. If it returns
|
||||||
an ``HttpResponse`` object, Django won't bother calling ANY other middleware or
|
an ``HttpResponse`` object, Django won't bother calling ANY other request,
|
||||||
the appropriate view; it'll return that ``HttpResponse``.
|
view or exception middleware, or the appropriate view; it'll return that
|
||||||
|
``HttpResponse``. Response middleware is always called on every response.
|
||||||
|
|
||||||
process_view
|
process_view
|
||||||
------------
|
------------
|
||||||
|
@ -197,8 +198,9 @@ arguments that will be passed to the view. Neither ``view_args`` nor
|
||||||
return either ``None`` or an ``HttpResponse`` object. If it returns ``None``,
|
return either ``None`` or an ``HttpResponse`` object. If it returns ``None``,
|
||||||
Django will continue processing this request, executing any other
|
Django will continue processing this request, executing any other
|
||||||
``process_view()`` middleware and, then, the appropriate view. If it returns an
|
``process_view()`` middleware and, then, the appropriate view. If it returns an
|
||||||
``HttpResponse`` object, Django won't bother calling ANY other middleware or
|
``HttpResponse`` object, Django won't bother calling ANY other request, view
|
||||||
the appropriate view; it'll return that ``HttpResponse``.
|
or exception middleware, or the appropriate view; it'll return that
|
||||||
|
``HttpResponse``. Response middleware is always called on every response.
|
||||||
|
|
||||||
process_response
|
process_response
|
||||||
----------------
|
----------------
|
||||||
|
@ -236,7 +238,8 @@ Guidelines
|
||||||
|
|
||||||
* Feel free to look at Django's available middleware for examples. The
|
* Feel free to look at Django's available middleware for examples. The
|
||||||
core Django middleware classes are in ``django/middleware/`` in the
|
core Django middleware classes are in ``django/middleware/`` in the
|
||||||
Django distribution. The session middleware is in ``django/contrib/sessions``.
|
Django distribution. The session middleware is in
|
||||||
|
``django/contrib/sessions``.
|
||||||
|
|
||||||
* If you write a middleware component that you think would be useful to
|
* If you write a middleware component that you think would be useful to
|
||||||
other people, contribute to the community! Let us know, and we'll
|
other people, contribute to the community! Let us know, and we'll
|
||||||
|
|
Loading…
Reference in New Issue