diff options
| author | Marko Tibold | 2012-11-30 11:58:10 -0800 |
|---|---|---|
| committer | Marko Tibold | 2012-11-30 11:58:10 -0800 |
| commit | 52b12434d0d8efd3159bc21e966528103f3292f5 (patch) | |
| tree | 0dcb79acc2d2bba29792b21b77feaea7bda93a0c /rest_framework/authtoken/views.py | |
| parent | 8d485da483c2a5cc0713a65ef30606966c082327 (diff) | |
| parent | 1b9d0eefba07cb3567ad7dbeb72c4c3b3c1f0de3 (diff) | |
| download | django-rest-framework-52b12434d0d8efd3159bc21e966528103f3292f5.tar.bz2 | |
Merge pull request #458 from asfaltboy/fix_authtoken_response
Fix authtoken response
Diffstat (limited to 'rest_framework/authtoken/views.py')
| -rw-r--r-- | rest_framework/authtoken/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/authtoken/views.py b/rest_framework/authtoken/views.py index 3ac674e2..cfaacbe9 100644 --- a/rest_framework/authtoken/views.py +++ b/rest_framework/authtoken/views.py @@ -18,7 +18,7 @@ class ObtainAuthToken(APIView): if serializer.is_valid(): token, created = Token.objects.get_or_create(user=serializer.object['user']) return Response({'token': token.key}) - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + return Response(serializer.errors, status=status.HTTP_401_UNAUTHORIZED) obtain_auth_token = ObtainAuthToken.as_view() |
