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

Summary

In this chapter, we took advantage of the various features included in Django REST Framework that allowed us to eliminate duplicate code and build our API reusing generalized behaviors. We used model serializers, wrappers, default parsing, and rendering options, class based views, and generic classes.

We used the browsable API feature and we designed a RESTful API that interacted with a complex PostgreSQL database. We declared relationships with the models, managed serialization and deserialization with relationships, and hyperlinks. Finally, we created and retrieved related resources and we understood how things work under the hoods.

Now that we have built a complex API with Django REST Framework, we will use additional abstractions included in the framework to improve our API, we will add security and authentication, which is what we are going to discuss in the next chapter.

主站蜘蛛池模板: 海宁市| 南江县| 社会| 恩平市| 那坡县| 开平市| 庆元县| 莆田市| 抚顺县| 洛扎县| 兴山县| 梅河口市| 绥芬河市| 宜宾市| 积石山| 澎湖县| 仪陇县| 荣昌县| 西乌珠穆沁旗| 萍乡市| 康保县| 张家口市| 长垣县| 柏乡县| 建瓯市| 湘乡市| 南和县| 岫岩| 赫章县| 内丘县| 玛曲县| 酉阳| 丹东市| 财经| 平乡县| 孝义市| 汝州市| 赫章县| 正安县| 呼图壁县| 望奎县|