aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authtoken/models.py
diff options
context:
space:
mode:
authorTom Christie2013-06-28 09:07:09 +0100
committerTom Christie2013-06-28 09:07:09 +0100
commit58d38d694eba94d4c6c20edcbefb5f4f91e6dd0f (patch)
treeba72bed1f1f20bed9d023fb076e0adcf7e92abf1 /rest_framework/authtoken/models.py
parentde00ec95c3007dd90b5b01f7486b430699ea63c1 (diff)
parent1f6a59d76da286e7a89e8e41317beb16a4aab7c7 (diff)
downloaddjango-rest-framework-58d38d694eba94d4c6c20edcbefb5f4f91e6dd0f.tar.bz2
Merge branch 'master' into writable-nested-modelserializer
Diffstat (limited to 'rest_framework/authtoken/models.py')
-rw-r--r--rest_framework/authtoken/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/authtoken/models.py b/rest_framework/authtoken/models.py
index 52c45ad1..7601f5b7 100644
--- a/rest_framework/authtoken/models.py
+++ b/rest_framework/authtoken/models.py
@@ -1,7 +1,7 @@
import uuid
import hmac
from hashlib import sha1
-from rest_framework.compat import User
+from rest_framework.compat import AUTH_USER_MODEL
from django.conf import settings
from django.db import models
@@ -11,7 +11,7 @@ class Token(models.Model):
The default authorization token model.
"""
key = models.CharField(max_length=40, primary_key=True)
- user = models.OneToOneField(User, related_name='auth_token')
+ user = models.OneToOneField(AUTH_USER_MODEL, related_name='auth_token')
created = models.DateTimeField(auto_now_add=True)
class Meta: