I have a custom User Model that extends from Django's User and I want to register that user model instead of only the default one.
For this, I am using the ACCOUNT_SIGNUP_FORM_CLASS setting as per allauth doc.
This is what I have in settings.py:
ACCOUNT_SIGNUP_FORM_CLASS = 'myapp.forms.SignupForm' And in myapp/forms.py:
class SignupForm(UserCreationForm): class Meta(UserCreationForm.Meta): model = MyUser def signup(self, request, user): print('test') user.save() MyUser(user=user).save() The signup() function should be executed:
This class [SignupForm] should implement a def signup(self, request, user) method, where user represents the newly signed up user.
But it isn't (test is not printed). Only User is saved, MyUser isn't. What am I doing wrong?