thunderbird_accounts.authentication.admin.forms

Classes

CustomNewUserForm([data, files, auto_id, ...])

Form fields:

CustomUserChangeForm(*args, **kwargs)

Form fields:

CustomUserFormBase([data, files, auto_id, ...])

Base class to use for custom user admin forms, contains some field overrides and cleaning functions.

class thunderbird_accounts.authentication.admin.forms.CustomUserFormBase(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, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: ModelForm

Base class to use for custom user admin forms, contains some field overrides and cleaning functions.

Form fields:

  • password: Password (CharField)

  • last_login: Last login (DateTimeField)

  • is_superuser: Superuser status (BooleanField)

  • groups: Groups (ModelMultipleChoiceField)

  • user_permissions: User permissions (ModelMultipleChoiceField)

  • username: Thundermail Address (CharField)

  • first_name: First name (CharField)

  • last_name: Last name (CharField)

  • email: Recovery Email Address (CharField)

  • is_staff: Staff status (BooleanField)

  • is_active: Active (BooleanField)

  • date_joined: Date joined (DateTimeField)

  • oidc_id: Keycloak User ID (CharField)

  • last_used_email: Last used email (CharField)

  • language: Language (TypedChoiceField)

  • display_name: Display name (CharField)

  • avatar_url: Avatar url (CharField)

  • timezone: Timezone (CharField)

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__’.

property media

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

class thunderbird_accounts.authentication.admin.forms.CustomNewUserForm(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, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: CustomUserFormBase

Form fields:

  • password: Password (CharField)

  • last_login: Last login (DateTimeField)

  • is_superuser: Superuser status (BooleanField)

  • groups: Groups (ModelMultipleChoiceField)

  • user_permissions: User permissions (ModelMultipleChoiceField)

  • username: Thundermail Address (CharField)

  • first_name: First name (CharField)

  • last_name: Last name (CharField)

  • email: Recovery Email Address (CharField)

  • is_staff: Staff status (BooleanField)

  • is_active: Active (BooleanField)

  • date_joined: Date joined (DateTimeField)

  • oidc_id: Oidc id (CharField)

  • last_used_email: Last used email (CharField)

  • language: Language (TypedChoiceField)

  • display_name: Display name (CharField)

  • avatar_url: Avatar url (CharField)

  • timezone: Timezone (CharField)

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__’.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

property media

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

class thunderbird_accounts.authentication.admin.forms.CustomUserChangeForm(*args, **kwargs)[source]

Bases: CustomUserFormBase

Form fields:

  • password: Password (CharField)

  • last_login: Last login (DateTimeField)

  • is_superuser: Superuser status (BooleanField)

  • groups: Groups (ModelMultipleChoiceField)

  • user_permissions: User permissions (ModelMultipleChoiceField)

  • username: Thundermail Address (CharField)

  • first_name: First name (CharField)

  • last_name: Last name (CharField)

  • email: Recovery Email Address (CharField)

  • is_staff: Staff status (BooleanField)

  • is_active: Active (BooleanField)

  • date_joined: Date joined (DateTimeField)

  • oidc_id: Keycloak User ID (CharField)

  • last_used_email: Last used email (CharField)

  • language: Language (TypedChoiceField)

  • display_name: Display name (CharField)

  • avatar_url: Avatar url (CharField)

  • timezone: Timezone (CharField)

__init__(*args, **kwargs)[source]
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__’.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

property media

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