tags:

views:

88

answers:

2

Is there a detailed diagram that describes how Django processes requests, from when the request is first handed to it until it hands back a response, specifically including how database connections are related to requests, e.g., 1 to 1, 1 to N, etc.?

If not, I'd appreciate a pointer to the point in the code where Django starts processing the request.

Thanks.

+2  A: 

I think this article includes the information you're looking for with a decent (if cluttered) diagram: http://uswaretech.com/blog/2009/06/django-request-response-processing/

You can also use the django-debug-toolbar to get more info about the SQL (and lots of other stuff) happening on behind the scenes of a particular request.

John Debs
Thanks. The blog had exactly the details I needed (where in the Django source it delegated to the handlers, etc.)
Hank Gay
+5  A: 

There is this diagram from The Django Book (online version): alt text

A breakdown of this process is described in Chapter 3 under the heading How Django Processes a Request: Complete Details.

jathanism