Test your knowledge

  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
  2. If we want to create a simple Toy model that we will use to represent and persist toys in Django REST framework, we can create:
    1.  A Toy class as a subclass of the djangorestframework.models.Model class
    2.  A Toy class as a subclass of the django.db.models.Model class
    3.  A Toy function in the restframeworkmodels.py file
  1. In Django REST framework, parsers and renderers:
    1. Handle as mediators between model instances and Python primitives
    2. Handle as mediators between Python primitives and HTTP requests and responses
    3. Handle as mediators between the view functions and Python primitives.
  2. Which of the following commands starts the Django shell?
    1. python manage.py shell
    2. python django.py shell
    3. django shell
  3. If we have a Django application named computers and a model called memory, what is the name of the table that Django's ORM will create to persist the model in the database?
    1. computers_memories
    2. memory_computers
    3. computers_memory

 

The rights answers are included in the AppendixSolutions.

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

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