From 08bcb4aec1ed154cefc631b8510ee13e9af0c19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Sat, 15 Sep 2012 18:30:33 +0300 Subject: [PATCH] Splitted User to AbstractUser and User --- django/contrib/auth/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 473bf218ea..deb624088f 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -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):