diff options
| author | Tim Graham <timograham@gmail.com> | 2016-02-23 13:20:50 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-23 13:20:50 -0500 |
| commit | c62807968d7930bfd34afc2036c67921b943592f (patch) | |
| tree | b2108d6eacd0021132dc788871ff7f449a4061aa | |
| parent | e81d1c995c0cc5573d3627de0fe6b803b2f43fb2 (diff) | |
Fixed a stray __unicode__() method in auth_tests.
| -rw-r--r-- | tests/auth_tests/models/custom_user.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auth_tests/models/custom_user.py b/tests/auth_tests/models/custom_user.py index 0519b09b75..62dbf9c8be 100644 --- a/tests/auth_tests/models/custom_user.py +++ b/tests/auth_tests/models/custom_user.py @@ -3,6 +3,7 @@ from django.contrib.auth.models import ( PermissionsMixin, UserManager, ) 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 @@ -32,6 +33,7 @@ class CustomUserManager(BaseUserManager): return u +@python_2_unicode_compatible class CustomUser(AbstractBaseUser): email = models.EmailField(verbose_name='email address', max_length=255, unique=True) is_active = models.BooleanField(default=True) @@ -49,7 +51,7 @@ class CustomUser(AbstractBaseUser): def get_short_name(self): return self.email - def __unicode__(self): + def __str__(self): return self.email # Maybe required? |
