Forms
Forms for the django_helmholtz_aai.views.
Classes:
|
A form that lets a user set their password without entering the old password |
|
A User Linking Form that prevents users with associated helmholtz users. |
|
Form fields: |
- class django_helmholtz_aai.forms.MapUserForm(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)
Bases:
FormA form that lets a user set their password without entering the old password
Form fields:
Attributes:
Return all media required to render the widgets on this form.
Methods:
save([commit])- property media
Return all media required to render the widgets on this form.
- save(commit=True)
- class django_helmholtz_aai.forms.NoDuplicatesUserLinkingForm(*args, **kwargs)
Bases:
UserLinkingFormA User Linking Form that prevents users with associated helmholtz users.
Form fields:
email: Email (EmailField)new_user: New User (ModelChoiceField)
Methods:
get_users(email, **kwargs)Given an email, return matching user(s).
Attributes:
Return all media required to render the widgets on this form.
- property media
Return all media required to render the widgets on this form.
- class django_helmholtz_aai.forms.UserLinkingForm(*args, **kwargs)
Bases:
FormForm fields:
email: Email (EmailField)new_user: New User (ModelChoiceField)
Methods:
__init__(*args, **kwargs)get_users(email, **kwargs)Given an email, return matching user(s).
save([domain_override, ...])Generate a one-use only link for resetting password and send it to the user.
send_mail(subject_template_name, ...[, ...])Send a django.core.mail.EmailMultiAlternatives to to_email.
Attributes:
Return all media required to render the widgets on this form.
- property media
Return all media required to render the widgets on this form.
- save(domain_override=None, subject_template_name='helmholtz_aai/link_user_subject.txt', email_template_name='helmholtz_aai/link_user_email.html', use_https=False, token_generator: ~django_helmholtz_aai.tokens.UserLinkingTokenGenerator = <django_helmholtz_aai.tokens.UserLinkingTokenGenerator object>, from_email=None, request=None, html_email_template_name=None, extra_email_context=None)
Generate a one-use only link for resetting password and send it to the user.
- send_mail(subject_template_name, email_template_name, context, from_email, to_email, html_email_template_name=None)
Send a django.core.mail.EmailMultiAlternatives to to_email.