Q:

EDit Django admin Form so that only staff users can change users password

I have django project in which I modified Django admin form for editing users , here i have made Password a ReadOnly Field . Thus no one can change user password . But I wants that Staff user can change password . So for that I want to provide a link to Staff users and from that link Staff user can change password of user .
I was wondering if this is possible from  Django form (the same model from where I have made the password field readonly) .
My admin form code : 
class CustomUserChangeForm(forms.ModelForm):
    password = ReadOnlyPasswordHashField()

    class Meta:
        model = User

A:

Add the below code in your form 
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>."))

as answered here

