org.models.form =============== .. py:module:: org.models.form Classes ------- .. autoapisummary:: org.models.form.BuiltinFormDefinition org.models.form.CustomFormDefinition Functions --------- .. autoapisummary:: org.models.form.submission_deletable Module Contents --------------- .. py:class:: BuiltinFormDefinition Bases: :py:obj:`onegov.form.models.FormDefinition`, :py:obj:`onegov.org.models.extensions.AccessExtension`, :py:obj:`onegov.org.models.extensions.ContactExtension`, :py:obj:`onegov.org.models.extensions.PersonLinkExtension`, :py:obj:`onegov.org.models.extensions.CoordinatesExtension`, :py:obj:`onegov.search.SearchableContent`, :py:obj:`onegov.org.models.extensions.HoneyPotExtension`, :py:obj:`onegov.org.models.extensions.GeneralFileLinkExtension` Defines a form stored in the database. .. py:attribute:: __mapper_args__ .. py:attribute:: fts_type_title Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name. .. py:attribute:: fts_id :value: 'name' 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. .. py:attribute:: show_vat :type: onegov.core.orm.mixins.dict_property[bool] .. py:property:: extensions :type: tuple[str, Ellipsis] .. py:class:: CustomFormDefinition Bases: :py:obj:`onegov.form.models.FormDefinition`, :py:obj:`onegov.org.models.extensions.AccessExtension`, :py:obj:`onegov.org.models.extensions.ContactExtension`, :py:obj:`onegov.org.models.extensions.PersonLinkExtension`, :py:obj:`onegov.org.models.extensions.CoordinatesExtension`, :py:obj:`onegov.search.SearchableContent`, :py:obj:`onegov.org.models.extensions.HoneyPotExtension`, :py:obj:`onegov.org.models.extensions.GeneralFileLinkExtension` Defines a form stored in the database. .. py:attribute:: __mapper_args__ .. py:attribute:: fts_type_title Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name. .. py:attribute:: fts_id :value: 'name' 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. .. py:attribute:: default_extensions :value: ['honeypot'] .. py:attribute:: show_vat :type: onegov.core.orm.mixins.dict_property[bool] .. py:property:: extensions :type: tuple[str, Ellipsis] .. py:function:: submission_deletable(submission: onegov.form.models.FormSubmission, session: sqlalchemy.orm.Session, payment_blocks: bool = True) -> onegov.ticket.Ticket | bool 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.