#12502: Diagram doesn't match text in Middleware documentation
------------------------------------+---------------------------------------
          Reporter:  petrilli       |         Owner:  gabrielhurley
            Status:  assigned       |     Milestone:  1.2          
         Component:  Documentation  |       Version:  SVN          
        Resolution:                 |      Keywords:               
             Stage:  Accepted       |     Has_patch:  1            
        Needs_docs:  0              |   Needs_tests:  0            
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by shai):

 * cc: shai (added)

Comment:

 Hi,

 The images provided, as well as the one currently in the docs, share a
 problem: They are misleading, because they over-simplify the process.

 The points missed:

  1. There are actually two passes "going in", one using `process_request`
 and one using `process_view`
  1. The "go in, then out" pictures create the impression that
 `process_response` will only be called for a given middleware class if the
 corresponding `process_request` was called; the text makes it clear that
 this isn't the case.
  1. Exception processing is left completely out of the picture, and that
 is especially misleading; in particular, it should be made clear that
 exception processing does not replace response processing, but is done
 before it; and that it is only applied to the view, not to any processing
 in the middlewares.

 The mismatch of the list of middlewares is, in comparison, completely
 minor IMHO. Also, I think a simple, complete solution to the list mismatch
 problem is to use generic names ("MiddleWareA, MiddleWareB" etc.) in the
 diagram.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12502#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to