▲ 0 r/django
which to choose for creating drf views?
im confused which one to learn from following for django drf views:
| View Type | Class | Best For | Industry Usage |
|---|---|---|---|
| Function-Based Views | api_view |
Small APIs, beginners | ⭐⭐☆☆☆ |
| APIView | APIView |
Custom logic | ⭐⭐⭐⭐☆ |
| GenericAPIView + Mixins | GenericAPIView + Mixins |
CRUD with customization | ⭐⭐⭐⭐☆ |
| Generic Class-Based Views | ListCreateAPIView, RetrieveUpdateDestroyAPIView, etc. |
Standard CRUD | ⭐⭐⭐⭐⭐ |
| ViewSets + Router | ModelViewSet, ReadOnlyModelViewSet |
RESTful APIs | ⭐⭐⭐⭐⭐ |
above response is given by chatgpt but i need opinion of experienced developers
u/Puzzled_Cod_9192 — 11 days ago