mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Merge pull request #3723 from linovia/bug/authtoken_versionning_compat
Add extra args/kwargs to authtoken's views (#3718)
This commit is contained in:
commit
df071d5555
|
@ -12,7 +12,7 @@ class ObtainAuthToken(APIView):
|
||||||
renderer_classes = (renderers.JSONRenderer,)
|
renderer_classes = (renderers.JSONRenderer,)
|
||||||
serializer_class = AuthTokenSerializer
|
serializer_class = AuthTokenSerializer
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request, *args, **kwargs):
|
||||||
serializer = self.serializer_class(data=request.data)
|
serializer = self.serializer_class(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
user = serializer.validated_data['user']
|
user = serializer.validated_data['user']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user