In this gist, I will show the difference between three ways to build endpoints with Django Rest Framework. The pros and cons of each one, when you should use it and so on.
A REST framework provides an APIView
class, which subclasses Django's View
class.
According to the docs, the View
class is a callable which takes a request and returns a response. Is more than the view function because we can wrappe better the request-response flow, following REST principles