To create a new URL pattern in a Django app, you have to add it to the ____ file.
- models.py
- settings.py
- urls.py
- views.py
In Django, you create new URL patterns by adding them to the urls.py file of your app. This file maps URLs to view functions, allowing you to define the routing of your web application.
Loading...
Related Quiz
- You are assigned to develop a machine learning model that can identify fraudulent transactions. How would you deal with the class imbalance in the dataset?
- In web development, ____ is a technique used to update a web page without reloading it, which can be implemented using JavaScript and integrated with Python back-end.
- You need to normalize a NumPy array so that the values range between 0 and 1. How would you achieve this?
- In Matplotlib, the ____ function is used to add text annotations in arbitrary locations of the plot.
- Which Python built-in function will you use to sort a list of numbers in ascending order?