官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 郎溪县| 雅江县| 泽普县| 旅游| 沙河市| 安丘市| 建阳市| 遵义县| 平阳县| 内黄县| 兴安县| 抚顺县| 青浦区| 陵水| 临沧市| 清流县| 兴隆县| 涞源县| 山东省| 九龙县| 运城市| 金阳县| 银川市| 张家界市| 武乡县| 青铜峡市| 衡南县| 隆子县| 灯塔市| 福州市| 竹溪县| 绵阳市| 佛学| 东莞市| 蓬溪县| 盐津县| 白河县| 青龙| 娱乐| 武清区| 榆社县|