aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authtoken/models.py
diff options
context:
space:
mode:
authorPhilip Douglas2013-07-04 05:29:42 -0700
committerPhilip Douglas2013-07-04 05:29:42 -0700
commitbf8e71c455a47a53898f8239ac7dad47e5f1d53a (patch)
tree967055f41f43a35b8d9362f47c81aad5af4036d3 /rest_framework/authtoken/models.py
parentfa9f5fb8dcf6d51b2db70d4e2a991779b056d1d4 (diff)
parent5fa100245cbf71a47c7a1ea7a869d03049380130 (diff)
downloaddjango-rest-framework-bf8e71c455a47a53898f8239ac7dad47e5f1d53a.tar.bz2
Merge pull request #1 from tomchristie/master
Update from main
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: