Summary

In this chapter, we took advantage of many features included in Django REST Framework that allow 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 10.5 database. We declared relationships with the models, and we configured serialization and deserialization with hyperlinks. Finally, we created and retrieved related resources and understood how things work under the hood.

Now that we built a complex API with Django REST Framework that we can encapsulate in a microservice, we will use additional abstractions included in the framework to improve our API and will add security and authentication, which is the topic of the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.31.159