AKSolverInterface.forms module
- class AKSolverInterface.forms.JSONExportControlForm(*args, event: Event, **kwargs)[source]
Bases:
Form
Form to control what objects are exported to the solver.
Form fields:
export_scheduled_aks_as_fixed
: Fixate all scheduled slots for the solver (BooleanField
)export_categories
: AK Categories to include in the export (ModelMultipleChoiceField
)export_tracks
: AK tracks to include in the export (ModelMultipleChoiceField
)export_types
: AK types to include in the export (ModelMultipleChoiceField
)
- class AKSolverInterface.forms.JSONScheduleImportForm(*args, **kwargs)[source]
Bases:
AdminIntermediateForm
Form to import an AK schedule from a json file.
Form fields:
- clean()[source]
Extract and validate entered JSON data.
We allow entering of the schedule from two sources: 1. from an uploaded file 2. from a text field.
This function checks that data is entered from exactly one source. If so, the entered JSON string is validated against our schema. Any errors are reported at the corresponding form field.