web.forms package¶
web.forms package containing forms for the Eonvelope database models.
- class web.forms.BaseAccountForm(*args, **kwargs)[source]¶
Bases:
RequiredMarkerModelFormThe base form for
core.models.Account.Exposes all fields from the model that may be changed by the user. Other forms for
core.models.Accountshould inherit from this.- class Meta[source]¶
Bases:
objectMetadata class for the base form.
Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.
- 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.
- _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:
RequiredMarkerModelFormThe form for
core.models.Correspondent.Exposes all fields from the model that may be changed by the user. Other forms for
core.models.Correspondentshould inherit from this.- class Meta[source]¶
Bases:
objectMetadata 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_namefield.
- 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:
RequiredMarkerModelFormThe base form for
core.models.Daemon.Exposes all fields from the model that may be changed by the user. Other forms for
core.models.Daemonshould inherit from this.- Parameters:
args (Any)
kwargs (Any)
- class Meta[source]¶
Bases:
objectMetadata class for the base form.
Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.
- 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_markerto the required field labels.
- save(commit=True)[source]¶
Extended to add the intervaldata to the instance.
Important
There should not be duplicate IntervalSchedules. https://django-celery-beat.readthedocs.io/en/latest/index.html#example-creating-interval-based-periodic-task
- class web.forms.BaseMailboxForm(*args, **kwargs)[source]¶
Bases:
RequiredMarkerModelFormThe base form for
core.models.Mailbox.Exposes all fields from the model that may be changed by the user. Other forms for
core.models.Mailboxshould inherit from this.- class Meta[source]¶
Bases:
objectMetadata class for the base form.
Other form metaclasses should inherit from this. These submetaclasses must not expose fields that are not listed here.
- 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:
BaseDaemonFormForm for
core.models.Daemonwhich also allows to select a mailbox.- Parameters:
args (Any)
kwargs (Any)
- __init__(*args, **kwargs)[source]¶
Extended to restrict the choices for mailbox to the users mailboxes.
- _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:
CreateDaemonFormForm for
core.models.Daemonwhich also allows to select a mailbox.- Parameters:
args (Any)
kwargs (Any)
- _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.