Let's see whether you can answer the following questions correctly:
- Which of the following commands run the script to create a new Django app named recipes:
- python django.py startapp recipes
- python manage.py startapp recipes
- python starapp.py recipes
- Which of the following strings must be added to the INSTALLED_APPS variable to add Django REST Framework in the Django application:
- 'rest-framework'
- 'django-rest-framework'
- 'rest_framework'
- Django's ORM:
- Is integrated with Django
- Has to be configured as an optional component in Django
- Has to be installed after configuring SQLAlchemy
- In Django REST Framework, serializers are:
- Mediators between the view functions and Python primitives
- Mediators between the URLs and view functions
- Mediators between the model instances and Python primitives
- The urlpatterns list declared in the urls.py file makes it possible to:
- Route URLs to models
- Route URLs to Python primitives
- Route URLs to views
- In Django REST Framework, parsers and renderers handle as mediators between:
- Model instances and Python primitives
- Python primitives and HTTP requests and responses
- URLs and view functions
- If we want to create a simple Game model to represent and persist games in Django REST Framework, we can create:
- A Game class as a subclass of the django.db.models.Model superclass
- A Game class as a subclass of the djangorestframework.models.Model superclass
- A Game function in the restframeworkmodels.py file