+1 vote
in Data Handling by
Explain how a request is processed in Django?

1 Answer

0 votes
by

In case some user requests a page from some Django powered site, the system follows an algorithm that determines which Python code needs to be executed. Here are the steps that sum up the algorithm:

Django first determines which root URLconf or URL configuration module is to be used

Then, that particular Python module is loaded and then Django looks for the variable urlpatterns

These URL patterns are then run by Django, and it stops at the first match of the requested URL

Once that is done, the Django then imports and calls the given view

In case none of the URLs match the requested URL, Django invokes an error-handling view

Related questions

0 votes
asked Apr 4, 2020 in Data Handling by amita rallin
+1 vote
asked Apr 4, 2020 in Data Handling by amita rallin
...