I can create my view in Django with :
Now is there any standard to tell us when should we use which?
and why we have this much type at all?
There is no standard but you can start with this simple strategy:
RetrieveAPIView
,
ListAPIView
, UpdateAPIView
, etc.)ModelViewSet
and ReadOnlyModelViewSet
are most useful)@action(detail=True)
@action(detail=False)
@action
again.Also check DRF views classes for quick overview.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With