imported and updated to contrib auth User model

This commit is contained in:
Asif Saifuddin Auvi 2016-06-07 16:25:56 +06:00
parent 7dca49cb18
commit 45e38ddacc

View File

@ -1,7 +1,7 @@
import binascii
import os
from django.conf import AUTH_USER_MODEL
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@ -14,7 +14,7 @@ class Token(models.Model):
"""
key = models.CharField(_("Key"), max_length=40, primary_key=True)
user = models.OneToOneField(
AUTH_USER_MODEL, related_name='auth_token',
User, related_name='auth_token',
on_delete=models.CASCADE, verbose_name=_("User")
)
created = models.DateTimeField(_("Created"), auto_now_add=True)