django-password-policies ships two django.forms.Form classes that handles the validation of new passwords:
A form that lets a user set his/her password without entering the old password.
Has the following fields and methods:
PasswordPoliciesField (Required)
Parameters: |
|
---|
CharField (Required)
Parameters: |
|
---|
This forms error messages.
Initializes the form.
Parameters: | user – A User instance. |
---|
Validates that a given password was not used before.
Validates that the two new passwords match.
Sets the user’s password to the new one and creates an entry in the user’s password history, if PASSWORD_USE_HISTORY is set to True.
Bases: password_policies.forms.PasswordPoliciesForm
A form that lets a user change his/her password by entering their old password.
Has the following fields and methods:
CharField (Required)
Parameters: |
|
---|
PasswordPoliciesField (Required)
Parameters: |
|
---|
CharField (Required)
Parameters: |
|
---|
This forms error messages.
Validates the current password.
Validates that old and new password are not too similar.
A form to support user registration with password policies.
Has the following fields and methods:
RegexField (Required)
Parameters: |
|
---|
PasswordPoliciesField (Required)
Parameters: |
|
---|
CharField (Required)
Parameters: |
|
---|
This forms error messages.
Validates that the username is not already taken.
Validates that the two passwords are identical.
A form to let a user reset his/her password.
Has the following fields and methods:
EmailField (Required)
Parameters: |
|
---|
This forms error messages.
Validates that an active user exists with the given email address.
Generates a one-use only link for resetting password and sends to the user.
Parameters: |
|
---|
Returns a dictionary with common context items.
Parameters: |
---|