setup_wizard.forms

This module contains forms for the setup wizard app.

Classes

EmptyForm

A form without any fields.

StartupWizardTlsCertificateForm

The Setup Wizard TLS Certificate Form.

Module Contents

class setup_wizard.forms.EmptyForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]

Bases: django.forms.Form

A form without any fields.

class setup_wizard.forms.StartupWizardTlsCertificateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]

Bases: django.forms.Form

The Setup Wizard TLS Certificate Form.

ipv4_addresses[source]
ipv6_addresses[source]
domain_names[source]
clean_ipv4_addresses()[source]

Splits the IPv4 addresses and returns them as a list of strings.

Returns:

A list of the IPv4 addresses or an empty list.

Raises:

ValidationError – If it contains a term that is not a valid IPv4 address.

Return type:

list[ipaddress.IPv4Address]

clean_ipv6_addresses()[source]

Splits the IPv6 addresses and returns them as a list of strings.

Returns:

A list of the IPv6 addresses or an empty list.

Raises:

ValidationError – If it contains a term that is not a valid IPv6 address.

Return type:

list[ipaddress.IPv6Address]

clean_domain_names()[source]

Splits the domain names and returns them as a list of strings.

Returns:

A list of the domain names or an empty list.

Return type:

list[str]

clean()[source]

Checks that at least one SAN entry is set.

Returns:

The cleaned data.

Raises:

ValidationError – If no SAN entry is set.

Return type:

dict[str, Any]