Test your knowledge

Let's see whether you can answer the following questions correctly:

  1. Which of the following commands run the script to create a new Django app named recipes:
    1. python django.py startapp recipes
    2. python manage.py startapp recipes
    3. python starapp.py recipes
  1. Which of the following strings must be added to the INSTALLED_APPS variable to add Django REST Framework in the Django application:
    1. 'rest-framework'
    2. 'django-rest-framework'
    3. 'rest_framework'
  1. Django's ORM:
    1. Is integrated with Django
    2. Has to be configured as an optional component in Django
    3. Has to be installed after configuring SQLAlchemy
  1. In Django REST Framework, serializers are:
    1. Mediators between the view functions and Python primitives
    2. Mediators between the URLs and view functions
    3. Mediators between the model instances and Python primitives
  1. The urlpatterns list declared in the urls.py file makes it possible to:
    1. Route URLs to models
    2. Route URLs to Python primitives
    3. Route URLs to views
  1. In Django REST Framework, parsers and renderers handle as mediators between:
    1. Model instances and Python primitives
    2. Python primitives and HTTP requests and responses
    3. URLs and view functions

  1. If we want to create a simple Game model to represent and persist games in Django REST Framework, we can create:
    1. A Game class as a subclass of the django.db.models.Model superclass
    2. A Game class as a subclass of the djangorestframework.models.Model superclass
    3. A Game function in the restframeworkmodels.py file

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.56.114