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

  • Django RESTful Web Services
  • Gaston C. Hillar
  • 186字
  • 2021-06-30 19:30:58

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.

主站蜘蛛池模板: 和静县| 昭觉县| 邵阳县| 永平县| 甘肃省| 图木舒克市| 拉萨市| 德江县| 盖州市| 贺兰县| 瓦房店市| 桦甸市| 晋宁县| 蒲江县| 衡东县| 高邮市| 高台县| 张掖市| 屯门区| 离岛区| 衡南县| 阿拉善右旗| 沙坪坝区| 合山市| 乐陵市| 来宾市| 潜山县| 彰化市| 莆田市| 化州市| 中山市| 登封市| 灌云县| 荔浦县| 广饶县| 德化县| 怀来县| 盈江县| 依安县| 鲜城| 新营市|