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

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.

主站蜘蛛池模板: 额尔古纳市| 益阳市| 高安市| 镇巴县| 临西县| 北辰区| 牙克石市| 宜州市| 天峻县| 武鸣县| 阿坝| 贺州市| 三台县| 财经| 元氏县| 巴彦淖尔市| 泗水县| 内丘县| 普兰县| 余姚市| 嵊泗县| 江北区| 宁晋县| 扎鲁特旗| 黄陵县| 凤冈县| 海宁市| 呼图壁县| 荥经县| 江口县| 棋牌| 达尔| 新营市| 门头沟区| 龙南县| 昌平区| 高安市| 怀宁县| 武乡县| 青岛市| 淳化县|