sio3pack.django.common.handler¶
Module Contents¶
- class sio3pack.django.common.handler.DjangoHandler(package, problem_id)[source]¶
Base class for handling Django models. Allows to save the package to the database and retrieve its data.
- package¶
- problem_id¶
- save_to_db()[source]¶
Save the package to the database.
- Raises:
PackageAlreadyExists – If a package with the same problem ID already exists.
- property lang_titles: dict[str, str]¶
A dictionary of problem titles, where keys are language codes and values are titles.
- property model_solutions: list[dict[str, Any]]¶
A list of model solutions, where each element is a dictionary containing a
RemoteFile
object.
- property main_model_solution: sio3pack.files.remote_file.RemoteFile¶
The main model solution as a
RemoteFile
.- Return type:
- property lang_statements: dict[str, sio3pack.files.remote_file.RemoteFile]¶
A dictionary of problem statements, where keys are language codes and values are files.
- Return type:
- property tests: list[sio3pack.test.Test]¶
A list of tests, where each element is a dictionary containing
- Return type:
- property workflows: dict[str, sio3pack.workflow.Workflow]¶
A dictionary of workflows, where keys are workflow names and values are
Workflow
objects.- Return type: