AKSubmission.forms module

Submission-specific forms

class AKSubmission.forms.AKForm(*args, **kwargs)[source]

Bases: AvailabilitiesFormMixin, ModelForm

Base form to add and edit AKs

Contains suitable widgets for the different data types, restricts querysets (e.g., of requirements) to entries belonging to the event this AK belongs to. Prepares initial slot creation (by accepting multiple input formats and a list of slots to generate), automatically generate short names and wiki links if necessary

Will be modified/used by AKSubmissionForm (that allows to add slots and excludes links) and AKWishForm

Form fields:

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

Normalize/clean inputs

Generate a (not yet used) short name if field was left blank, create a list of normalized slot durations

Returns:

cleaned inputs

class AKSubmission.forms.AKSubmissionForm(*args, **kwargs)[source]

Bases: AKForm

Form for Submitting new AKs

Is a special variant of AKForm that does not allow to manually edit wiki and protocol links and enforces the generation of at least one slot.

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 AKSubmission.forms.AKWishForm(*args, **kwargs)[source]

Bases: AKForm

Form for submitting or editing wishes

Is a special variant of AKForm that does not allow to specify owner(s) or manually edit wiki and protocol links

Form fields:

class AKSubmission.forms.AKOwnerForm(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 to create/edit AK owners

Form fields:

class AKSubmission.forms.AKDurationForm(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 to add an additional slot to a given AK

Form fields:

class AKSubmission.forms.AKOrgaMessageForm(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 to create a confidential message to the organizers belonging to a given AK

Form fields: