Mediators between the view functions and Python primitives
Mediators between the URLs and view functions
Mediators between the model instances and Python primitives
If we want to create a simple Toy model that we will use to represent and persist toys in Django REST framework, we can create:
A Toy class as a subclass of the djangorestframework.models.Model class
A Toy class as a subclass of the django.db.models.Model class
A Toy function in the restframeworkmodels.py file
In Django REST framework, parsers and renderers:
Handle as mediators between model instances and Python primitives
Handle as mediators between Python primitives and HTTP requests and responses
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.