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

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.

主站蜘蛛池模板: 珲春市| 澜沧| 纳雍县| 昭平县| 高阳县| 马公市| 额济纳旗| 芜湖县| 陈巴尔虎旗| 长海县| 甘德县| 嘉义市| 江永县| 永德县| 宜州市| 柘城县| 通辽市| 曲靖市| 洛扎县| 康平县| 定南县| 东城区| 乌海市| 青州市| 呼伦贝尔市| 梅州市| 军事| 湟源县| 稷山县| 保山市| 普格县| 济宁市| 肥乡县| 靖安县| 遂川县| 泰顺县| 景泰县| 岢岚县| 什邡市| 菏泽市| 佛坪县|