

#DJANGO REST FRAMEWORK APIVIEW CODE#
DRF reduces the code amount needed for REST interface creation and provides reusability.ĪPIView class is an important component of the DRF views by which the view class of Django is sub-classed. DRF view classes are inherited from the View class of Django.

Introduction to DRF Viewsĭjango REST Framework is abbreviated as DRF and the building of which is done on top of Django, so many features are inherited from Django by the DRF. Class-based views extend APIViews and determine how the handling of the request can be done and what policy attributes are used by you for the API. Rewriting the root view as class-based can be done by the APIView class. APIView class is an important component of the DRF views by which the view class of Django is sub-classed. DRF stands for Django REST Framework and which is built on top of Django.
