Skip to main content

PasswordChangeForm

A form that lets a user change their password by entering their old password.

Attributes

AttributeTypeDescription
error_messagesdictA dictionary mapping error codes to localized error message strings, including a specific message for incorrect old password entries.
old_passwordforms.CharFieldA form field used to collect and validate the user's current password before allowing a change.
field_orderlist = ["old_password", "new_password1", "new_password2"]A list defining the display sequence of form fields, ensuring the old password field appears before the new password fields.

Constructor

Signature

def PasswordChangeForm()

Methods


clean_old_password()

@classmethod
def clean_old_password() - > string

Validate that the old_password field is correct.

Returns

TypeDescription
stringThe validated old password string if the authentication check succeeds