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:

__init__(*args, event: Event, **kwargs)[source]
class AKSolverInterface.forms.JSONScheduleImportForm(*args, **kwargs)[source]

Bases: AdminIntermediateForm

Form to import an AK schedule from a json file.

Form fields:

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