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

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.

主站蜘蛛池模板: 韶山市| 四平市| 沂水县| 梓潼县| 四会市| 凤凰县| 珠海市| 青浦区| 夹江县| 溧水县| 陕西省| 清新县| 化德县| 十堰市| 康乐县| 石城县| 丰都县| 和田市| 福安市| 田阳县| 东乌| 亳州市| 平武县| 义乌市| 当阳市| 佛冈县| 遵义市| 吴旗县| 宁城县| 江西省| 西峡县| 浦北县| 普定县| 海口市| 百色市| 岑溪市| 涪陵区| 从化市| 新绛县| 客服| 玉田县|