Re: Code Inspect

2019-12-11 Thread Integr@te System
Hi, You may need refer to ModelViewSet class that inherit from GenericAPIView class https://www.django-rest-framework.org/api-guide/viewsets/#modelviewset On Wed, Dec 11, 2019, 16:38 Soumen Khatua wrote: > > > > > > > > > *class UserViewSet(viewsets.ModelViewSet):queryset = > get_user_mo

Code Inspect

2019-12-11 Thread Soumen Khatua
*class UserViewSet(viewsets.ModelViewSet):queryset = get_user_model().objectsserializer_class = UserSerializerdef get_permissions(self):if self.request.method == 'POST': self.permission_classes = (AllowAny,)return super(UserViewSet, self).get_permissions()* I didn't und