setup_wizard.forms ================== .. py:module:: setup_wizard.forms .. autoapi-nested-parse:: This module contains forms for the setup wizard app. Module Contents --------------- .. py:class:: 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) Bases: :py:obj:`django.forms.Form` A form without any fields. .. py:class:: 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) Bases: :py:obj:`django.forms.Form` The Setup Wizard TLS Certificate Form. .. py:attribute:: ipv4_addresses .. py:attribute:: ipv6_addresses .. py:attribute:: domain_names .. py:method:: clean_ipv4_addresses() 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. .. py:method:: clean_ipv6_addresses() 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. .. py:method:: clean_domain_names() Splits the domain names and returns them as a list of strings. :returns: A list of the domain names or an empty list. .. py:method:: clean() Checks that at least one SAN entry is set. :returns: The cleaned data. :raises ValidationError: If no SAN entry is set. .. py:class:: HsmSetupForm(hsm_type = 'softhsm', *args, **kwargs) Bases: :py:obj:`django.forms.Form` Form for HSM setup configuration. .. py:attribute:: module_path .. py:attribute:: slot .. py:attribute:: label .. py:attribute:: hsm_type .. py:method:: clean() Custom validation for the form. .. py:method:: clean_label() Clean token label field. .. py:method:: clean_slot() Clean slot number field. .. py:method:: clean_module_path() Clean module path field. .. py:class:: BackupPasswordForm(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) Bases: :py:obj:`django.forms.Form` Form for setting up backup password for PKCS#11 token. .. py:attribute:: password .. py:attribute:: confirm_password .. py:method:: clean_password() Clean and validate the password field using Django's password validators. :returns: The cleaned password. :raises ValidationError: If password validation fails. .. py:method:: clean() Validate the form data. :returns: The cleaned data. :raises ValidationError: If validation fails. .. py:class:: BackupRestoreForm(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) Bases: :py:obj:`django.forms.Form` Form for restoring from backup with optional backup password. .. py:attribute:: MAX_PASSWORD_LENGTH :value: 128 .. py:attribute:: backup_file .. py:attribute:: backup_password .. py:method:: clean_backup_file() Validate the backup file. .. py:method:: clean_backup_password() Clean the backup password field. .. py:class:: PasswordAutoRestoreForm(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) Bases: :py:obj:`django.forms.Form` Form for filling the password for auto-restore. .. py:attribute:: password .. py:method:: clean_password() Clean and validate the password field using Django's password validators. :returns: The cleaned password. :raises ValidationError: If password validation fails.