- 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.
推薦閱讀
- SpringMVC+MyBatis快速開發與項目實戰
- iOS 9 Game Development Essentials
- C# 2012程序設計實踐教程 (清華電腦學堂)
- Java從入門到精通(第5版)
- Git高手之路
- HTML5游戲開發案例教程
- Effective Python Penetration Testing
- Python編程與幾何圖形
- Mastering Data Mining with Python:Find patterns hidden in your data
- Instant Debian:Build a Web Server
- SQL Server 入門很輕松(微課超值版)
- PHP+MySQL Web應用開發教程
- 少兒編程輕松學(全2冊)
- 軟硬件綜合系統軟件需求建模及可靠性綜合試驗、分析、評價技術
- Less Web Development Cookbook