Jump to >

This documentation covers the in-development release of Djblets. You can see the latest stable docs or all previous versions.


Basic utility functions for authentication.

This contains some validation functions that may be useful for forms.

Validate that the test cookie was properly set in a prior request.

If the test cookie was not set, the given form’s submit field will be set with an error saying that cookies must be enabled.

validate_old_password(form, user, field_name='password')[source]

Validate that the password given on a form was valid.

This is intended for Password Change forms, and will check that the specified password in the form matches the user’s current password.