diff options
| author | Xavier Ordoquy | 2012-12-02 12:43:32 +0100 | 
|---|---|---|
| committer | Xavier Ordoquy | 2012-12-02 12:43:32 +0100 | 
| commit | 5fad46d7e213afed503b1533515cab96875a5936 (patch) | |
| tree | 72ab362e86a83ba53361613dbb1e7863889ea749 /rest_framework/authtoken | |
| parent | fa53dde576c8733292eacf27c80cf7a0ad222c3b (diff) | |
| parent | 3114b4fa50e7aee296a0de17e7bcdc0753700ec3 (diff) | |
| download | django-rest-framework-5fad46d7e213afed503b1533515cab96875a5936.tar.bz2 | |
Merge remote-tracking branch 'reference/master' into p3k
Diffstat (limited to 'rest_framework/authtoken')
| -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() | 
