Splitted User to AbstractUser and User

This commit is contained in:
Anssi Kääriäinen 2012-09-15 18:30:33 +03:00
parent d9f5e5addb
commit 08bcb4aec1
1 changed files with 5 additions and 2 deletions

View File

@ -277,7 +277,7 @@ class AbstractBaseUser(models.Model):
@python_2_unicode_compatible
class User(AbstractBaseUser):
class AbstractUser(AbstractBaseUser):
"""
Users within the Django authentication system are represented by this
model.
@ -317,7 +317,7 @@ class User(AbstractBaseUser):
class Meta:
verbose_name = _('user')
verbose_name_plural = _('users')
swappable = 'AUTH_USER_MODEL'
abstract = True
def __str__(self):
return self.username
@ -434,6 +434,9 @@ class User(AbstractBaseUser):
raise SiteProfileNotAvailable
return self._profile_cache
class User(AbstractUser):
class Meta:
swappable = 'AUTH_USER_MODEL'
@python_2_unicode_compatible
class AnonymousUser(object):