Hi all, How to resolve this exception in generic view of rest-framework- api Exception=================== 2020-02-14 08:30:33,523 - D:\futuredatapoints\futuredatapoints\logs\14022020 .log - ERROR ERROR:D:\futuredatapoints\futuredatapoints\logs\14022020.log: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Exception Start %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2020-02-14 08:30:33,523 - D:\futuredatapoints\futuredatapoints\logs\14022020 .log - ERROR 2020-02-14 08:30:33,523 - D:\futuredatapoints\futuredatapoints\logs\14022020 .log - ERROR ERROR:D:\futuredatapoints\futuredatapoints\logs\14022020 .log:Traceback (most recent call last): File "D:\futuredatapoints\env\lib\site-packages\django\core\handlers\base.py" , line 124, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "D:\futuredatapoints\env\lib\site-packages\django\views\decorators\csrf.py" , line 54, in wrapped_view return view_func(*args, **kwargs) File "D:\futuredatapoints\env\lib\site-packages\django\views\generic\base.py" , line 68, in view return self.dispatch(request, *args, **kwargs) File "D:\futuredatapoints\env\lib\site-packages\rest_framework\views.py" , line 479, in dispatch request = self.initialize_request(request, *args, **kwargs) File "D:\futuredatapoints\env\lib\site-packages\rest_framework\views.py" , line 380, in initialize_request authenticators=self.get_authenticators(), File "D:\futuredatapoints\env\lib\site-packages\rest_framework\views.py" , line 274, in get_authenticators return [auth() for auth in self.authentication_classes] File "D:\futuredatapoints\env\lib\site-packages\rest_framework\views.py" , line 274, in <listcomp> return [auth() for auth in self.authentication_classes] TypeError: 'list' object is not callable
WARNING:django.request:Bad Request: /api/send/otp/ url====== =========================================================== url(r'^api/send/data/$',UserViewSetCustom.as_view(),name= 'user-view-set-custom'), view generic class ================ class UserViewSetCustom(generics.CreateAPIView): """ A simple CreateAPIView that for sending otp for user. """ # permission_classes = (AllowAny,) authentication_classes = [TokenAuthentication,], queryset = User.objects.all() def create(self, request): print("*******") return Response( data=jsonResponse([], msg=Message.getMessage('NOT_ALLOWED'), status=status.HTTP_200_OK), status=status.HTTP_200_OK, ) Thanks Bhoopesh Sisoudiya -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAk3c1N0JBOFkF7tyMLJdMY3bh3H54r-QVh6_x-KW9peaRo9dA%40mail.gmail.com.