Fixed a stray __unicode__() method in auth_tests.
This commit is contained in:
parent
e81d1c995c
commit
c62807968d
|
@ -3,6 +3,7 @@ from django.contrib.auth.models import (
|
||||||
PermissionsMixin, UserManager,
|
PermissionsMixin, UserManager,
|
||||||
)
|
)
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
|
|
||||||
|
|
||||||
# The custom User uses email as the unique identifier, and requires
|
# The custom User uses email as the unique identifier, and requires
|
||||||
|
@ -32,6 +33,7 @@ class CustomUserManager(BaseUserManager):
|
||||||
return u
|
return u
|
||||||
|
|
||||||
|
|
||||||
|
@python_2_unicode_compatible
|
||||||
class CustomUser(AbstractBaseUser):
|
class CustomUser(AbstractBaseUser):
|
||||||
email = models.EmailField(verbose_name='email address', max_length=255, unique=True)
|
email = models.EmailField(verbose_name='email address', max_length=255, unique=True)
|
||||||
is_active = models.BooleanField(default=True)
|
is_active = models.BooleanField(default=True)
|
||||||
|
@ -49,7 +51,7 @@ class CustomUser(AbstractBaseUser):
|
||||||
def get_short_name(self):
|
def get_short_name(self):
|
||||||
return self.email
|
return self.email
|
||||||
|
|
||||||
def __unicode__(self):
|
def __str__(self):
|
||||||
return self.email
|
return self.email
|
||||||
|
|
||||||
# Maybe required?
|
# Maybe required?
|
||||||
|
|
Loading…
Reference in New Issue