- Building RESTful Python Web Services
- Gastón C. Hillar
- 194字
- 2021-08-20 10:24:23
Test your knowledge
- If we want to create a simple
Player
model that we will use to represent and persist players in Django REST framework, we can create:- A
Player
class as a subclass of thedjangorestframework.models.Model class
. - A
Player
class as a subclass of thedjango.db.models.Model class
. - A Player function in the
restframeworkmodels.py
file.
- A
- In the Django REST Framework, serializers are:
- Mediators between the model instances and Python primitives.
- Mediators between the view functions and Python primitives.
- Mediators between the URLs and view functions.
- In the Django REST Framework, parsers and renderers:
- Handle as mediators between model instances and Python primitives.
- Reset the board.
- Handle as mediators between Python primitives and HTTP requests and responses.
- The
urlpatterns
list declared in the urls.py file makes it possible to:- Route URLs to views.
- Route URLs to models.
- Route URLs to Python primitives.
- HTTPie is a:
- Command-line HTTP server written in Python that makes it easy to create a RESTful Web Server.
- Command-line utility that allows us to run queries against an SQLite database.
- Command-line HTTP client written in Python that makes it easy to compose and send HTTP requests.
推薦閱讀
- 數據庫原理及應用(Access版)第3版
- Dynamics 365 Application Development
- 零基礎玩轉區塊鏈
- 新編Premiere Pro CC從入門到精通
- Windows Presentation Foundation Development Cookbook
- 微信小程序入門指南
- Getting Started with NativeScript
- Cybersecurity Attacks:Red Team Strategies
- After Effects CC技術大全
- Python物理建模初學者指南(第2版)
- MySQL數據庫應用實戰教程(慕課版)
- R語言實戰(第2版)
- VMware vSphere 5.5 Cookbook
- Professional JavaScript
- Swift 2 Design Patterns