This fixes a lot of the issues that @bl-nero was having earlier. The passwords are now stored as hashed values and require a different form to change.
@bl-nero's remark that
The fact that they don’t work means that they are not being stored in plain text, but it’s just that the form is somehow wrong.
was mostly correct. We still use a ModelForm, but the AccountAdmin inherits from UserAdmin as opposed to ModelAdmin. This allows us to specify Account creation and modification forms and gives us some user creation functionality right out of the box. It also ensures that the passwords to remain hashed and requires a different form to change them.
This fixes a lot of the issues that @bl-nero was having earlier. The passwords are now stored as hashed values and require a different form to change.
@bl-nero's remark that
was mostly correct. We still use a
ModelForm
, but theAccountAdmin
inherits fromUserAdmin
as opposed toModelAdmin
. This allows us to specify Account creation and modification forms and gives us some user creation functionality right out of the box. It also ensures that the passwords to remain hashed and requires a different form to change them.