I can create my view in Django with :
- Function Base View
- Class Base View
- Generic Views & Mixins
- ViewSets
Now is there any standard to tell us when should we use which?
and why we have this much type at all?
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.