aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authtoken
diff options
context:
space:
mode:
authorTom Christie2014-09-19 14:05:50 +0100
committerTom Christie2014-09-19 14:05:50 +0100
commit88008c0a687219e3104d548196915b1068536d74 (patch)
tree31c21a93d3e11e8ba66e83c96f8947783e8d676e /rest_framework/authtoken
parent6d73b5969a9d415a6d43175e77bc10ba76151e97 (diff)
parent1e9ea377e3f0521ec5d9c21527cfad3c7626baaa (diff)
downloaddjango-rest-framework-88008c0a687219e3104d548196915b1068536d74.tar.bz2
Merge branch 'master' into version-3.0
Diffstat (limited to 'rest_framework/authtoken')
-rw-r--r--rest_framework/authtoken/migrations/0001_initial.py7
-rw-r--r--rest_framework/authtoken/serializers.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/rest_framework/authtoken/migrations/0001_initial.py b/rest_framework/authtoken/migrations/0001_initial.py
index 2e5d6b47..769f6202 100644
--- a/rest_framework/authtoken/migrations/0001_initial.py
+++ b/rest_framework/authtoken/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
@@ -15,12 +15,11 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Token',
fields=[
- ('key', models.CharField(max_length=40, serialize=False, primary_key=True)),
- ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, to_field='id')),
+ ('key', models.CharField(primary_key=True, serialize=False, max_length=40)),
('created', models.DateTimeField(auto_now_add=True)),
+ ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='auth_token')),
],
options={
- 'abstract': False,
},
bases=(models.Model,),
),
diff --git a/rest_framework/authtoken/serializers.py b/rest_framework/authtoken/serializers.py
index edeae857..c2c456de 100644
--- a/rest_framework/authtoken/serializers.py
+++ b/rest_framework/authtoken/serializers.py
@@ -20,7 +20,7 @@ class AuthTokenSerializer(serializers.Serializer):
msg = _('User account is disabled.')
raise serializers.ValidationError(msg)
else:
- msg = _('Unable to login with provided credentials.')
+ msg = _('Unable to log in with provided credentials.')
raise serializers.ValidationError(msg)
else:
msg = _('Must include "username" and "password"')