web.forms package

web.forms package containing forms for the Eonvelope database models.

class web.forms.BaseAccountForm(*args, **kwargs)[source]

Bases: RequiredMarkerModelForm

The base form for core.models.Account.

Exposes all fields from the model that may be changed by the user. Other forms for core.models.Account should inherit from this.

Parameters:
class Meta[source]

Bases: object

Metadata class for the base form.

Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.

model

alias of Account

fields: ClassVar[list[str]] = ['mail_address', 'password', 'mail_host', 'protocol', 'mail_host_port', 'timeout', 'allow_insecure_connection']

Exposes all fields that the user should be able to change.

localized_fields = '__all__'

Localize all fields.

widgets: ClassVar[dict[str, type[Widget] | Widget]] = {'password': <django.forms.widgets.PasswordInput object>}

Allow initial values in the password field.

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'allow_insecure_connection': <django.forms.fields.BooleanField object>, 'mail_address': <django.forms.fields.CharField object>, 'mail_host': <django.forms.fields.CharField object>, 'mail_host_port': <django.forms.fields.IntegerField object>, 'password': <django.forms.fields.CharField object>, 'protocol': <django.forms.fields.TypedChoiceField object>, 'timeout': <django.forms.fields.IntegerField object>}
declared_fields = {}
property media

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

class web.forms.BaseCorrespondentForm(*args, **kwargs)[source]

Bases: RequiredMarkerModelForm

The form for core.models.Correspondent.

Exposes all fields from the model that may be changed by the user. Other forms for core.models.Correspondent should inherit from this.

Parameters:
class Meta[source]

Bases: object

Metadata class for the form.

Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.

model

alias of Correspondent

fields: ClassVar[list[str]] = ['real_name']

Exposes only the core.models.Correspondent.Correspondent.real_name field.

localized_fields = '__all__'

Localize all fields.

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'real_name': <django.forms.fields.CharField object>}
declared_fields = {}
property media

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

class web.forms.BaseDaemonForm(*args, **kwargs)[source]

Bases: RequiredMarkerModelForm

The base form for core.models.Daemon.

Exposes all fields from the model that may be changed by the user. Other forms for core.models.Daemon should inherit from this.

Parameters:
  • args (Any)

  • kwargs (Any)

class Meta[source]

Bases: object

Metadata class for the base form.

Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.

model

alias of Daemon

fields: ClassVar[list[str]] = ['fetching_criterion', 'fetching_criterion_arg']

Exposes all fields that the user should be able to change.

localized_fields = '__all__'

Localize all fields.

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'fetching_criterion': <django.forms.fields.TypedChoiceField object>, 'fetching_criterion_arg': <django.forms.fields.CharField object>, 'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>}
declared_fields = {'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>}
property media

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

__init__(*args, **kwargs)[source]

Extended constructor adding required_marker to the required field labels.

Parameters:
Return type:

None

save(commit=True)[source]

Extended to add the intervaldata to the instance.

Return type:

Any

Parameters:

commit (bool)

class web.forms.BaseMailboxForm(*args, **kwargs)[source]

Bases: RequiredMarkerModelForm

The base form for core.models.Mailbox.

Exposes all fields from the model that may be changed by the user. Other forms for core.models.Mailbox should inherit from this.

Parameters:
class Meta[source]

Bases: object

Metadata class for the base form.

Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.

model

alias of Mailbox

fields: ClassVar[list[str]] = ['save_to_eml', 'save_attachments']

Exposes all fields that the user should be able to change.

localized_fields = '__all__'

Localize all fields.

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'save_attachments': <django.forms.fields.BooleanField object>, 'save_to_eml': <django.forms.fields.BooleanField object>}
declared_fields = {}
property media

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

class web.forms.CreateDaemonForm(*args, **kwargs)[source]

Bases: BaseDaemonForm

Form for core.models.Daemon which also allows to select a mailbox.

Parameters:
  • args (Any)

  • kwargs (Any)

class Meta[source]

Bases: Meta

Metadata class form with a field for the mailbox fk.

fields: ClassVar[list[str]] = ['fetching_criterion', 'fetching_criterion_arg', 'mailbox']

Exposes all fields that the user should be able to change.

__init__(*args, **kwargs)[source]

Extended to restrict the choices for mailbox to the users mailboxes.

Parameters:
Return type:

None

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'fetching_criterion': <django.forms.fields.TypedChoiceField object>, 'fetching_criterion_arg': <django.forms.fields.CharField object>, 'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>, 'mailbox': <django.forms.models.ModelChoiceField object>}
declared_fields = {'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>}
property media

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

class web.forms.CreateMailboxDaemonForm(*args, **kwargs)[source]

Bases: CreateDaemonForm

Form for core.models.Daemon which also allows to select a mailbox.

Parameters:
  • args (Any)

  • kwargs (Any)

class Meta[source]

Bases: Meta

Metadata class form with a hidden mailbox field.

widgets: ClassVar[dict[str, HiddenInput]] = {'mailbox': <django.forms.widgets.HiddenInput object>}

Hide the mailbox input field.

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'fetching_criterion': <django.forms.fields.TypedChoiceField object>, 'fetching_criterion_arg': <django.forms.fields.CharField object>, 'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>, 'mailbox': <django.forms.models.ModelChoiceField object>}
declared_fields = {'interval_every': <django.forms.fields.IntegerField object>, 'interval_period': <django.forms.fields.ChoiceField object>}
property media

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

Subpackages

Submodules