landsgemeinde.forms.assembly ============================ .. py:module:: landsgemeinde.forms.assembly Classes ------- .. autoapisummary:: landsgemeinde.forms.assembly.AssemblyForm Module Contents --------------- .. py:class:: AssemblyForm(formdata: webob.multidict.MultiDict[str, Any] | None = None, obj: object | None = None, prefix: str = '', data: dict[str, Any] | None = None, meta: dict[str, Any] | None = None, *, extra_filters: collections.abc.Mapping[str, collections.abc.Sequence[Any]] | None = None, **kwargs: Any) Bases: :py:obj:`onegov.form.forms.NamedFileForm` Base class for handling database models using named files with forms. Example:: class MyModel(AssociatedFiles): pdf = NamedFile() class MyForm(NamedFileForm): pdf = UploadField('PDF') @MyApp.form(model=MyCollection, form=MyForm, ...) def add(self, request, form): if form.submitted(request): self.add(**form.get_useful_data()) ... ... @MyApp.form(model=MyModel, form=MyForm, ...) def edit(self, request, form): if form.submitted(request): form.populate_obj(self) ... form.process(obj=self) ... .. py:attribute:: request :type: onegov.landsgemeinde.request.LandsgemeindeRequest .. py:attribute:: date .. py:attribute:: state .. py:attribute:: extraordinary .. py:attribute:: info_video .. py:attribute:: video_url .. py:attribute:: start_time .. py:attribute:: memorial_pdf .. py:attribute:: memorial_2_pdf .. py:attribute:: memorial_supplement_pdf .. py:attribute:: protocol_pdf .. py:attribute:: audio_mp3 .. py:attribute:: audio_zip .. py:attribute:: overview .. py:method:: on_request() -> None .. py:method:: get_useful_data() -> dict[str, Any] Returns the form data in a dictionary, by default excluding data that should not be stored in the db backend. .. py:method:: validate_date(field: wtforms.fields.DateField) -> None