diff options
| author | Pavel Savchenko | 2012-11-28 23:04:10 +0200 |
|---|---|---|
| committer | Pavel Savchenko | 2012-11-28 23:04:10 +0200 |
| commit | 050e228edc3a20eceb705946997623a55081c6d1 (patch) | |
| tree | 35b50fb87cef9d3808e909921b8262a73c580d3b | |
| parent | 0a4c9f083135a0bf432478c3857efab2c7ed6ee0 (diff) | |
| parent | 7eec582d406b9b366f9d364b53d1fc509831d9b4 (diff) | |
| download | django-rest-framework-050e228edc3a20eceb705946997623a55081c6d1.tar.bz2 | |
Merge branch 'patch-2' of https://github.com/asfaltboy/django-rest-framework into fix_authtoken_response
| -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() |
