Changing password in Django Admin

前端 未结 7 1715
一个人的身影
一个人的身影 2020-12-14 19:49

I recently created the admin.py based in the Django Project Document:

https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 19:59

    Put this in your 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 this form."))
    

提交回复
热议问题