Django Flashcards
1
Q
What is the request life cycle in django?
A
- User requests to view URL
- Django determines the root URLconf by looking at the Root_UrlConf setting.
- Django looks at all of the URLpatterns in the URLconf for the first one that matches the URL
- If it finds a match, it calls the associated view function. and repeats 3-4 if redirected to another urls.py
- The view function returns an HTTPResponse
- Django converts the HttpResponse to the proper HTTP response, which results in a Web page.