cri_auth.forms module
- class cri_auth.forms.LoginForm(request=None, *args, **kwargs)[source]
Bases:
django.contrib.auth.forms.AuthenticationForm
- base_fields = {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}
- clean()[source]
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- declared_fields = {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}
- error_messages = {'inactive': 'This account is inactive.', 'invalid_login': 'Please enter a correct %(username)s and password. Note that both fields are case-sensitive. Make sure you are entering your CRI password and not the password of you email account!', 'multiple_users': 'There are multiple users matching this email', 'service_account': 'This account is a service account, it is not allowed to sign-in'}
- property media
Return all media required to render the widgets on this form.
- class cri_auth.forms.PasswordResetForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
django.contrib.auth.forms.PasswordResetForm
- base_fields = {'email': <django.forms.fields.CharField object>}
- declared_fields = {'email': <django.forms.fields.CharField object>}
- get_users(email)[source]
Given an email, return matching user(s) who should receive a reset.
This allows subclasses to more easily customize the default policies that prevent inactive users and users with unusable passwords from resetting their password.
- property media
Return all media required to render the widgets on this form.