form.models.submission
Classes
| Defines a submitted form of any kind in the database. | |
| Defines a submitted survey of any kind in the database. | |
| Defines a submitted form of any kind in the database. | |
| Defines a submitted form of any kind in the database. | |
| A general file (image, document, pdf, etc), referenced in the database. | 
Module Contents
- class form.models.submission.FormSubmission[source]
- Bases: - onegov.core.orm.Base,- onegov.core.orm.mixins.TimestampMixin,- onegov.pay.Payable,- onegov.file.AssociatedFiles,- onegov.form.extensions.Extendable- Defines a submitted form of any kind in the database. - registration_window: sqlalchemy.orm.relationship[onegov.form.models.FormRegistrationWindow | None][source]
 - property form_class: type[onegov.form.Form][source]
- Parses the form definition and returns a form class. 
 - property form_obj: onegov.form.Form[source]
- Returns a form instance containing the submission data. 
 - property payable_reference: str[source]
- A string which identifies this payable in payment lists. Do not join any values here as it can lead to an explosion of executed queries! - By default we use the table name plus a hash derived from the primary key values of the table. This ensures that we do not accidentally leak secrets. - In practice, this reference should be customised for each payable. 
 - process_payment(price: onegov.pay.Price | None, provider: onegov.pay.PaymentProvider[Any] | None = None, token: str | None = None) onegov.pay.Payment | onegov.pay.PaymentError | bool | None[source]
- Takes a request, optionally with the provider and the token by the provider that can be used to charge the credit card and creates a payment record if necessary. - Returns True or a payment object if the payment was processed successfully. That is, if there is a payment or if there is no payment required the method returns truthy. 
 
- class form.models.submission.SurveySubmission[source]
- Bases: - onegov.core.orm.Base,- onegov.core.orm.mixins.TimestampMixin,- onegov.file.AssociatedFiles,- onegov.form.extensions.Extendable- Defines a submitted survey of any kind in the database. - submission_window: sqlalchemy.orm.relationship[onegov.form.models.SurveySubmissionWindow | None][source]
 - property form_class: type[onegov.form.Form][source]
- Parses the form definition and returns a form class. 
 
- class form.models.submission.PendingFormSubmission[source]
- Bases: - FormSubmission- Defines a submitted form of any kind in the database. 
- class form.models.submission.CompleteFormSubmission[source]
- Bases: - FormSubmission- Defines a submitted form of any kind in the database.