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

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.

主站蜘蛛池模板: 佳木斯市| 德清县| 葫芦岛市| 阿巴嘎旗| 固安县| 克什克腾旗| 桐柏县| 丰顺县| 内江市| 屯昌县| 怀集县| 湘乡市| 乐陵市| 淮南市| 曲周县| 色达县| 顺平县| 石渠县| 淄博市| 永安市| 凤庆县| 乌兰察布市| 琼海市| 上虞市| 安丘市| 富阳市| 双牌县| 舒兰市| 佛山市| 高密市| 银川市| 衡阳市| 镇平县| 安陆市| 武冈市| 鹤岗市| 奈曼旗| 霸州市| 八宿县| 胶南市| 容城县|