org.models.form

Classes

BuiltinFormDefinition

Defines a form stored in the database.

CustomFormDefinition

Defines a form stored in the database.

Functions

submission_deletable(→ Ticket | bool)

CustomFormDefinition's are normally linked to a ticket.

Module Contents

class org.models.form.BuiltinFormDefinition[source]

Bases: onegov.form.models.FormDefinition, onegov.org.models.extensions.AccessExtension, onegov.org.models.extensions.ContactExtension, onegov.org.models.extensions.PersonLinkExtension, onegov.org.models.extensions.CoordinatesExtension, onegov.search.SearchableContent, onegov.org.models.extensions.HoneyPotExtension, onegov.org.models.extensions.GeneralFileLinkExtension

Defines a form stored in the database.

__mapper_args__[source]
es_type_name = 'builtin_forms'[source]

Returns the unique type name of the model.

es_id = 'name'[source]

The name of the id attribute (not the actual value!).

If you use this on an ORM model, be sure to use a primary key, all other properties are not available during deletion.

property extensions: tuple[str, Ellipsis][source]
class org.models.form.CustomFormDefinition[source]

Bases: onegov.form.models.FormDefinition, onegov.org.models.extensions.AccessExtension, onegov.org.models.extensions.ContactExtension, onegov.org.models.extensions.PersonLinkExtension, onegov.org.models.extensions.CoordinatesExtension, onegov.search.SearchableContent, onegov.org.models.extensions.HoneyPotExtension, onegov.org.models.extensions.GeneralFileLinkExtension

Defines a form stored in the database.

__mapper_args__[source]
es_type_name = 'custom_forms'[source]

Returns the unique type name of the model.

es_id = 'name'[source]

The name of the id attribute (not the actual value!).

If you use this on an ORM model, be sure to use a primary key, all other properties are not available during deletion.

default_extensions = ['honeypot'][source]
property extensions: tuple[str, Ellipsis][source]
org.models.form.submission_deletable(submission: onegov.form.models.FormSubmission, session: sqlalchemy.orm.Session, payment_blocks: bool = True) Ticket | bool[source]

CustomFormDefinition’s are normally linked to a ticket.

Submissions without registration window do not require a decision. The ticket state decides, whether the form definition can be deleted to provide some safeguard.

With registration window, we can check if the submission is decided and can close the ticket even if it is still pending.