diff options
| author | Tom Christie | 2013-06-26 17:56:42 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-06-26 17:56:42 +0100 | 
| commit | 715bd47dfababd39be9b3295ada99f2107d7c00c (patch) | |
| tree | 6ca416aa106f0d2737438e9983590ebeb44b5036 /rest_framework/authtoken | |
| parent | 13a3c993ab20e7af510d615a5eafaa87667b8efb (diff) | |
| download | django-rest-framework-715bd47dfababd39be9b3295ada99f2107d7c00c.tar.bz2 | |
Use AUTH_USER_MODEL consistently between various Django versions. Closes #946
Diffstat (limited to 'rest_framework/authtoken')
| -rw-r--r-- | rest_framework/authtoken/models.py | 4 | 
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: | 
