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:
name
: Name (CharField
)slug
: Short Form (SlugField
)timezone
: Time Zone (TypedChoiceField
)plan_hidden
: Plan Hidden (BooleanField
)is_init
: Is Init (BooleanField
)
- 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:
name
: Name (CharField
)slug
: Short Form (SlugField
)place
: Place (CharField
)timezone
: Time Zone (TypedChoiceField
)start
: Start (DateTimeField
)end
: End (DateTimeField
)reso_deadline
: Resolution Deadline (DateTimeField
)interest_start
: Interest Window Start (DateTimeField
)interest_end
: Interest Window End (DateTimeField
)public
: Public event (BooleanField
)active
: Active State (BooleanField
)plan_hidden
: Plan Hidden (BooleanField
)base_url
: Base URL (URLField
)wiki_export_template_name
: Wiki Export Template Name (CharField
)default_slot
: Default Slot Length (DecimalField
)contact_email
: Contact email address (EmailField
)
- 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:
import_categories
: Copy ak categories (ModelMultipleChoiceField
)import_requirements
: Copy ak requirements (ModelMultipleChoiceField
)
- 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:
active
: Active State (BooleanField
)
- 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:
pks
: Pks (CharField
)
- 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:
num_next
: # next AKs (IntegerField
)presentation_mode
: Presentation only? (TypedChoiceField
)wish_notes
: Space for notes in wishes? (TypedChoiceField
)
- 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:
availabilities
: Default Slots (CharField
)
- 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:
rooms
: New rooms (CharField
)create_default_availabilities
: Default availabilities? (BooleanField
)
- 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:
name
: Name (CharField
)location
: Location (CharField
)capacity
: Capacity (IntegerField
)event
: Event (ModelChoiceField
)
- class AKModel.forms.RoomFormWithAvailabilities(*args, **kwargs)[source]
Bases:
AvailabilitiesFormMixin
,RoomForm
Room (update) form including handling of availabilities, extends
RoomForm
Form fields:
name
: Name (CharField
)location
: Location (CharField
)capacity
: Capacity (IntegerField
)properties
: Properties (ModelMultipleChoiceField
)event
: Event (ModelChoiceField
)availabilities
: Availability (CharField
)