Answer the question
In order to leave comments, you need to log in
How to make Django-registration and abstract user friends?
Redefined the user model,
class User(AbstractUser):
balance = models.IntegerField(default=0, verbose_name='Баланс')
usergroups = models.ForeignKey(UserGroup, verbose_name='Группа', blank=True, null=True)
AUTH_USER_MODEL = 'personalarea.User'
def dispatch(self, *args, **kwargs):
if not self.registration_allowed():
return redirect(self.disallowed_url)
return super(RegistrationView, self).dispatch(*args, **kwargs)
Answer the question
In order to leave comments, you need to log in
AUTH_USER_MODEL = 'personalarea.User'
Added to the form (RegistrationForm) in Meta model = User, it worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question