diff options
| author | Tom Christie | 2013-01-15 17:53:24 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-01-15 17:53:24 +0000 |
| commit | 71e55cc4f6300959398f7aef4a8d91b6a6a2af57 (patch) | |
| tree | 68c2080034263d897741da33cbc5e09746006257 /rest_framework/authtoken/models.py | |
| parent | 52847a215d4e8de88e81d9ae79ce8bee9a36a9a2 (diff) | |
| parent | e1076cfb49b6293aa837cf7bdb4c11988892c598 (diff) | |
| download | django-rest-framework-71e55cc4f6300959398f7aef4a8d91b6a6a2af57.tar.bz2 | |
Merge with latest master
Diffstat (limited to 'rest_framework/authtoken/models.py')
| -rw-r--r-- | rest_framework/authtoken/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/authtoken/models.py b/rest_framework/authtoken/models.py index 5b3071aa..4da2aa62 100644 --- a/rest_framework/authtoken/models.py +++ b/rest_framework/authtoken/models.py @@ -1,6 +1,7 @@ import uuid import hmac from hashlib import sha1 +from rest_framework.compat import User from django.db import models @@ -9,7 +10,7 @@ class Token(models.Model): The default authorization token model. """ key = models.CharField(max_length=40, primary_key=True) - user = models.OneToOneField('auth.User', related_name='auth_token') + user = models.OneToOneField(User, related_name='auth_token') created = models.DateTimeField(auto_now_add=True) def save(self, *args, **kwargs): |
