Hello ,
I am little confused about RegistrationView form class, I have set my url
path('accounts/register/', RegistrationView.as_view( form_class=YogaUserForm, success_url="/" ), name="django_registration_register"),
and form
from yogavidya.apps.profiles.models import User
class YogaUserForm(RegistrationForm):
class Meta(RegistrationForm.Meta):
model = User
and now I get an error, could not figure out how to solve this? can you help me ? Thanks.
ImproperlyConfigured at /accounts/register/
You are attempting to use the registration view <class 'django_registration.backends.one_step.views.RegistrationView'>
with the form class <class 'yogavidya.apps.profiles.forms.YogaUserForm'>,
but the model used by that form (<class 'django.contrib.auth.models.User'>) is not
your Django installation's user model (<class 'yogavidya.apps.profiles.models.User'>).
Most often this occurs because you are using a custom user model, but
forgot to specify a custom registration form class for it. Specifying
a custom registration form class is required when using a custom user
model. Please see django-registration's documentation on custom user
models for more details.
Hello , I am little confused about RegistrationView form class, I have set my url
path('accounts/register/', RegistrationView.as_view( form_class=YogaUserForm, success_url="/" ), name="django_registration_register"),
and form
and now I get an error, could not figure out how to solve this? can you help me ? Thanks.