pas.forms.parliamentarian

Classes

ParliamentarianForm

Base class for handling database models using named files with forms.

Module Contents

class pas.forms.parliamentarian.ParliamentarianForm(formdata: 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: Mapping[str, Sequence[Any]] | None = None, **kwargs: Any)[source]

Bases: 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) …

personnel_number[source]
contract_number[source]
gender[source]
first_name[source]
last_name[source]
picture[source]
shipping_method[source]
shipping_address[source]
shipping_address_addition[source]
shipping_address_zip_code[source]
shipping_address_city[source]
private_address[source]
private_address_addition[source]
private_address_zip_code[source]
private_address_city[source]
date_of_birth[source]
date_of_death[source]
place_of_origin[source]
occupation[source]
academic_title[source]
salutation[source]
salutation_for_address[source]
salutation_for_letter[source]
forwarding_of_bills[source]
phone_private[source]
phone_mobile[source]
phone_business[source]
email_primary[source]
email_secondary[source]
website[source]
remarks[source]