AKModel.forms module

Central and admin forms

class AKModel.forms.DateTimeInput(attrs=None, format=None)[source]

Bases: DateInput

Simple widget for datetime input fields using the HTML5 datetime-local input type

class AKModel.forms.NewEventWizardStartForm(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

Initial view of new event wizard

This form is a model form for Event, but only with a subset of the required fields. It is therefore not possible to really create an event using this form, but only to enter information, in particular the timezone, that is needed to correctly handle/parse the user inputs for further required fields like start and end of the event.

The form will be used for this partial input, the input of the remaining required fields will then be handled by NewEventWizardSettingsForm (see below).

Form fields:

class AKModel.forms.NewEventWizardSettingsForm(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 second view of the event creation wizard.

Will handle the input of the remaining required as well as some optional fields. See also NewEventWizardStartForm.

Form fields:

class AKModel.forms.NewEventWizardPrepareImportForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

Wizard form for choosing an event to import/copy elements (requirements, categories, etc) from. Is used to restrict the list of elements to choose from in the next step (see NewEventWizardImportForm).

Form fields:

  • import_event: Copy ak requirements and ak categories of existing event (ModelChoiceField)

class AKModel.forms.NewEventWizardImportForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

Wizard form for excaclty choosing which elemments to copy/import for the newly created event. Possible elements are categories, requirements, and dashboard buttons if AKDashboard is active. The lists are restricted to elements from the event selected in the previous step (see NewEventWizardPrepareImportForm).

Form fields:

__init__(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, field_order=None, use_required_attribute=None, renderer=None)[source]
class AKModel.forms.NewEventWizardActivateForm(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

Wizard form to activate the newly created event

Form fields:

class AKModel.forms.AdminIntermediateForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

Base form for admin intermediate views (forms used there should inherit from this, by default, the form is empty since it is only needed for the confirmation button)

Form fields:

class AKModel.forms.AdminIntermediateActionForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: AdminIntermediateForm

Form for Admin Action Confirmation views – has a pks field needed to handle the serialization/deserialization of the IDs of the entities the user selected for the admin action to be performed on

Form fields:

class AKModel.forms.SlideExportForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: AdminIntermediateForm

Form to control the slides generated from the AK list of an event

The user can select how many upcoming AKs are displayed at the footer to inform people that it is their turn soon, whether the AK list should be restricted to those AKs that where marked for presentation, and whether ther should be a symbol and empty space to take notes on for wishes

Form fields:

class AKModel.forms.DefaultSlotEditorForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: AdminIntermediateForm

Form for default slot editor

Form fields:

class AKModel.forms.RoomBatchCreationForm(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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: AdminIntermediateForm

Form for room batch creation

Allows to input a list of room details and choose whether default availabilities should be generated for these rooms. Will check that the input follows a CSV format with at least a name column present.

Form fields:

clean_rooms()[source]

Validate and transform the input for the rooms textfield Treat the input as CSV and turn it into a dict containing the relevant information.

Returns:

a dict containing the raw room information

Return type:

dict[str, str]

class AKModel.forms.RoomForm(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

Room (creation) form (basic), will be extended for handling of availabilities (see RoomFormWithAvailabilities) and also for creating hybrid rooms in AKOnline (if active)

Form fields:

class AKModel.forms.RoomFormWithAvailabilities(*args, **kwargs)[source]

Bases: AvailabilitiesFormMixin, RoomForm

Room (update) form including handling of availabilities, extends RoomForm

Form fields:

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