AKPreference.forms module
- class AKPreference.forms.EventParticipantForm(*args, **kwargs)[source]
Bases:
AvailabilitiesFormMixin,ModelFormForm to add EventParticipants
Form fields:
name: Nickname (CharField)institution: Institution (CharField)requirements: Requirements (ModelMultipleChoiceField)event: Event (ModelChoiceField)availabilities: Availability (CharField)
- class AKPreference.forms.PreferenceForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]
Bases:
ModelFormForm for each preference
Form fields:
event: Event (ModelChoiceField)participant: Participant (ModelChoiceField)ak: AK (ModelChoiceField)preference: Preference (TypedChoiceField)
- class AKPreference.forms.PreferenceFormSet(*args, **kwargs)[source]
Bases:
BaseModelFormSetFormset to control all lines to enter preferences for a given participant and category
When a participant marks themselves as required for an AK, it is checked whether they are available long enough at the same time as the AK can take place (see
AKPreference.checks.availability_overlap()). Otherwise, the formset cannot be saved and errors are shown for the affected AKs as well as a summary.