AKPreference.forms module

class AKPreference.forms.EventParticipantForm(*args, **kwargs)[source]

Bases: AvailabilitiesFormMixin, ModelForm

Form to add EventParticipants

Form fields:

__init__(*args, **kwargs)[source]
clean_availabilities()[source]

Automatically improve availabilities entered. If the user did not specify availabilities assume the full event duration is possible :return: cleaned availabilities (either user input or one availability for the full length of the event if user input was empty)

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: ModelForm

Form for each preference

Form fields:

class AKPreference.forms.PreferenceFormSet(*args, **kwargs)[source]

Bases: BaseModelFormSet

Formset 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.

__init__(*args, **kwargs)[source]
clean()[source]

Make sure the participant is available long enough for all AKs they marked themselves as required for