form.models.registration_window =============================== .. py:module:: form.models.registration_window Attributes ---------- .. autoapisummary:: form.models.registration_window.daterange Classes ------- .. autoapisummary:: form.models.registration_window.FormRegistrationWindow Module Contents --------------- .. py:data:: daterange :type: sqlalchemy.Column[Any] .. py:class:: FormRegistrationWindow Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.TimestampMixin` Defines a registration window during which a form definition may be used to create submissions. Submissions created thusly are attached to the currently active registration window. Registration windows may not overlap. .. py:attribute:: __tablename__ :value: 'registration_windows' .. py:attribute:: id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: form :type: sqlalchemy.orm.Mapped[onegov.form.models.definition.FormDefinition] .. py:attribute:: enabled :type: sqlalchemy.orm.Mapped[bool] .. py:attribute:: start :type: sqlalchemy.orm.Mapped[datetime.date] .. py:attribute:: end :type: sqlalchemy.orm.Mapped[datetime.date] .. py:attribute:: timezone :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: limit :type: sqlalchemy.orm.Mapped[int | None] .. py:attribute:: overflow :type: sqlalchemy.orm.Mapped[bool] .. py:attribute:: submissions :type: sqlalchemy.orm.Mapped[list[onegov.form.models.submission.FormSubmission]] .. py:attribute:: __table_args__ .. py:property:: localized_start :type: datetime.datetime .. py:property:: localized_end :type: datetime.datetime .. py:method:: disassociate() -> None Disassociates all records linked to this window. .. py:property:: in_the_future :type: bool .. py:property:: in_the_past :type: bool .. py:property:: in_the_present :type: bool .. py:method:: accepts_submissions(required_spots: int = 1) -> bool .. py:property:: next_submission :type: onegov.form.models.submission.FormSubmission | None The submission next in line (first come, first serve). .. py:property:: available_spots :type: int .. py:property:: claimed_spots :type: int The number of actually claimed spots. .. py:property:: requested_spots :type: int The number of requested spots. When the claim has not been made yet, `spots` are counted as requested. When the claim has been partially made, the difference is counted as requested. If the claim has been fully made, the result is 0. If the claim has been relinquished, the result is 0.