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

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.

主站蜘蛛池模板: 桐庐县| 清水河县| 康平县| 玉田县| 南汇区| 老河口市| 平谷区| 牡丹江市| 洪泽县| 诏安县| 那坡县| 永兴县| 鹤庆县| 阿图什市| 深泽县| 大城县| 威宁| 双桥区| 杂多县| 长岭县| 梁平县| 抚顺县| 军事| 永泰县| 志丹县| 天长市| 迭部县| 三门峡市| 宝山区| 神农架林区| 铜陵市| 盐源县| 锦州市| 怀集县| 佛教| 象山县| 商水县| 兴海县| 久治县| 五家渠市| 临湘市|