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

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.

主站蜘蛛池模板: 巴楚县| 临朐县| 长治县| 尉氏县| 武穴市| 鄂尔多斯市| 乌拉特后旗| 乡宁县| 江永县| 桦南县| 繁昌县| 株洲市| 元朗区| 日土县| 洮南市| 江阴市| 巴塘县| 四子王旗| 镇沅| 叙永县| 根河市| 梅州市| 固阳县| 酉阳| 泸水县| 石林| 云梦县| 临颍县| 定边县| 寿宁县| 永城市| 沂水县| 靖江市| 高陵县| 法库县| 余姚市| 大城县| 富裕县| 时尚| 河间市| 平利县|