In this chapter, we will create a complex RESTful Web Service that will persist data in a PostgreSQL database. We will work with different types of relationships between the resources and we will take advantage of generic classes and generic views provided by the Django REST framework to reduce the amount of boilerplate code. We will gain an understanding of:
- Defining the requirements for a complex RESTful Web Service
- Creating a new app with Django
- Configuring a new web service
- Defining many-to-one relationships with models.ForeignKey
- Installing PostgreSQL
- Running migrations that generate relationships
- Analyzing the database
- Configuring serialization and deserialization with relationships
- Defining hyperlinks with serializers.HyperlinkedModelSerializer
- Working with class-based views
- Taking advantage of generic classes and generic...