Google News
logo
Django - Interview Questions
What does urls-config file contain in Django?
The URLs-config in Django contains the list of urls and the mappings to view functions for those urls.
 
The urls can map to view functions, Class-based views and urls-config of another application. All these methods have their use-cases.
 
For example – If we want to keep all the URLs of our application sorted, we will use the URL-config mapping. Inside urls file, we will use view function mapping and class-based views if we require some data from the user.
Advertisement