RegistrationForm is used by the public-facing RegistrationView.
I use a separate form because it can include registration specific code that is not needed in the backend User Creation process (e.g captcha field, label, help text).
You can customize it to fit your requirements.
UserCreationForm and UserChangeForm are used by the auto-generated Django Admin backend.
The need to be rewritten since they are tied to the inbuilt User model as explained here
The relevant code is in accounts/admin.py:
...
class AccountAdmin(BaseUserAdmin):
form = UserChangeForm
add_form = UserCreationForm
...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Rahul,
RegistrationForm
is used by the public-facingRegistrationView
.I use a separate form because it can include registration specific code that is not needed in the backend User Creation process (e.g captcha field, label, help text).
You can customize it to fit your requirements.
UserCreationForm
andUserChangeForm
are used by the auto-generated Django Admin backend.The need to be rewritten since they are tied to the inbuilt User model as explained here
The relevant code is in
accounts/admin.py
: