According to this answer, if I want to enable the ability to change user passwords in the admin area, I need to add/change some code in UserChangeForm.
I understand this does not mean change the original UserChangeForm, but rather, I should inherit the class which contains the UserChangeForm method, and override the method.
I don't understand where I am supposed to do this. Could someone please give me an example of where/how to override UserChangeForm? Assume I am using a custom user model which inherits AbstractBaseUser.
This is the code (from the linked answer above) for modifying passwords which should go in UserChangeForm:
password = ReadOnlyPasswordHashField(label= ("Password"),
help_text= ("Raw passwords are not stored, so there is no way to see "
"this user's password, but you can change the password "
"using <a href=\"password/\">this form</a>."))
Note I am assuming this will actually display the correct form which will correctly change the password, but it's possible I'm being naive about that.
Thank you.