2
I suspect the problem is that you are inheriting from auth_models.User
. This is multi-table inheritance and isnβt really appropriate for this situation. See the django docs here: https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#extending-django-s-default-user
Which basically say if you want to store profile data in a separate table there is no need to extend auth_models.User
. Just create a model with a OneToOneField
to auth_models.User
:
class UserProfile(models.Model):
objects = UserProfileManager()
organization = models.CharField(max_length=100)
country = CountryField()
is_verified = models.BooleanField(default=False)
blocked = models.BooleanField(default=False)
anonymous = models.BooleanField(default=False)
user = models.OneToOneField(auth_models.User)
Source:stackexchange.com