- 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.
推薦閱讀
- Learning Single:page Web Application Development
- C++面向?qū)ο蟪绦蛟O(shè)計(jì)(第三版)
- 潮流:UI設(shè)計(jì)必修課
- JavaScript:Functional Programming for JavaScript Developers
- 構(gòu)建移動(dòng)網(wǎng)站與APP:HTML 5移動(dòng)開發(fā)入門與實(shí)戰(zhàn)(跨平臺(tái)移動(dòng)開發(fā)叢書)
- Arduino開發(fā)實(shí)戰(zhàn)指南:LabVIEW卷
- Bootstrap 4:Responsive Web Design
- Python機(jī)器學(xué)習(xí)編程與實(shí)戰(zhàn)
- Apache Mesos Essentials
- MATLAB 2020從入門到精通
- Android系統(tǒng)原理及開發(fā)要點(diǎn)詳解
- Python爬蟲、數(shù)據(jù)分析與可視化:工具詳解與案例實(shí)戰(zhàn)
- 詳解MATLAB圖形繪制技術(shù)
- Python數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南(全彩)
- Delphi開發(fā)典型模塊大全(修訂版)