Let's see whether you can answer the following questions correctly:
urlpatternslist declared in the
urls.pyfile makes it possible to:
- Route URLs to Django models
- Route URLs to Django views
- Route URLs to Python primitives
- When the Django server receives an HTTP request, Django creates an instance of which of the following classes?
- A view function has to return an instance of which of the following classes?
- Whenever you have to return a specific status different from the default
200 OKstatus, it is a good practice to use the module variables defined in which of the following modules?
- If you want to retrieve a Toy instance whose primary key value is equal to
10and save it in the toy variable, which line of code would you write?
- toy = Toy.get_by(pk=10)
- toy = Toy...