UserChangeForm
This class provides a model form for updating user information and managing account permissions. It includes a read-only password field that displays security information instead of raw password data and optimizes permission queries using select_related. The form automatically adjusts help text based on whether the user has a usable password set.
Attributes
| Attribute | Type | Description |
|---|---|---|
| password | [ReadOnlyPasswordHashField](readonlypasswordhashfield.md?sid=django_contrib_auth_forms_readonlypasswordhashfield) | Raw passwords are not stored, so there is no way to see the user’s password. |
Constructor
Signature
def UserChangeForm(
*args: any,
**kwargs: any
)
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Variable length argument list. |
| **kwargs | any | Arbitrary keyword arguments. |
Signature
def UserChangeForm(
*args: tuple,
**kwargs: dict
)
Parameters
| Name | Type | Description |
|---|---|---|
| *args | tuple | Positional arguments passed to the parent ModelForm constructor |
| **kwargs | dict | Keyword arguments containing form data, initial values, and the model instance |