From b34250ec94fa13bfcac1fc21ff1dcbb3fd84c052 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Tue, 24 Oct 2017 20:14:12 -0400 Subject: [PATCH] Handle extra args and kwargs in all POST endpoints This fixes compatibility with DRF's versioning --- rest_auth/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rest_auth/views.py b/rest_auth/views.py index 58b5b29..8efcdd5 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -113,7 +113,7 @@ class LogoutView(APIView): return self.finalize_response(request, response, *args, **kwargs) - def post(self, request): + def post(self, request, *args, **kwargs): return self.logout(request) def logout(self, request): @@ -193,7 +193,7 @@ class PasswordResetConfirmView(GenericAPIView): def dispatch(self, *args, **kwargs): return super(PasswordResetConfirmView, self).dispatch(*args, **kwargs) - def post(self, request): + def post(self, request, *args, **kwargs): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save() @@ -216,7 +216,7 @@ class PasswordChangeView(GenericAPIView): def dispatch(self, *args, **kwargs): return super(PasswordChangeView, self).dispatch(*args, **kwargs) - def post(self, request): + def post(self, request, *args, **kwargs): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save()