Forms

Forms for the django_helmholtz_aai.views.

Classes:

MapUserForm([data, files, auto_id, prefix, ...])

A form that lets a user set their password without entering the old password

NoDuplicatesUserLinkingForm(*args, **kwargs)

A User Linking Form that prevents users with associated helmholtz users.

UserLinkingForm(*args, **kwargs)

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: Form

A form that lets a user set their password without entering the old password

Form fields:

Attributes:

media

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: UserLinkingForm

A User Linking Form that prevents users with associated helmholtz users.

Form fields:

Methods:

get_users(email, **kwargs)

Given an email, return matching user(s).

Attributes:

media

Return all media required to render the widgets on this form.

get_users(email: str, **kwargs)

Given an email, return matching user(s).

property media

Return all media required to render the widgets on this form.

class django_helmholtz_aai.forms.UserLinkingForm(*args, **kwargs)

Bases: Form

Form fields:

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:

media

Return all media required to render the widgets on this form.

__init__(*args, **kwargs) None
get_users(email: str, **kwargs)

Given an email, return matching user(s).

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.