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

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.

主站蜘蛛池模板: 米林县| 宜君县| 新丰县| 稻城县| 定结县| 沧源| 六枝特区| 宾阳县| 清涧县| 沛县| 新晃| 阿拉善盟| 十堰市| 景宁| 孝昌县| 赤峰市| 英山县| 那曲县| 昭觉县| 谢通门县| 崇礼县| 黄石市| 阳东县| 荣昌县| 延川县| 安远县| 阳新县| 龙川县| 嘉鱼县| 上饶县| 紫金县| 田阳县| 南充市| 永城市| 桂林市| 黑山县| 盐山县| 游戏| 体育| 南郑县| 长春市|