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

Summary

In this chapter, we designed a RESTful Web Service to interact with a simple SQLite database and perform CRUD operations with toys. We defined the requirements for our web service and we understood the tasks performed by each HTTP method and the different scopes.

We created a model to represent and persist toys, and we executed migrations in Django to create the required tables in an SQLite database. We analyzed the tables that Django generated. We learned to manage serialization of toy instances into JSON representations with Django REST framework and the reverse process.

Now that we understand models, migrations, serialization, and deserialization with Django and Django REST framework, we will create Django views combined with serializer classes and start making HTTP requests to our web service. We will cover these topics in Chapter 3, Creating API Views.

主站蜘蛛池模板: 新巴尔虎左旗| 观塘区| 五莲县| 会东县| 青海省| 长阳| 右玉县| 顺平县| 米脂县| 息烽县| 临漳县| 玛纳斯县| 崇州市| 浦东新区| 色达县| 浦东新区| 德昌县| 徐水县| 永安市| 靖宇县| 扎囊县| 上高县| 剑阁县| 乡城县| 金堂县| 诸城市| 恩施市| 安福县| 邛崃市| 曲靖市| 长白| 泽州县| 固原市| 文水县| 中宁县| 监利县| 句容市| 阳原县| 北辰区| 习水县| 凌源市|