sio3pack.django.common.handler ============================== .. py:module:: sio3pack.django.common.handler Module Contents --------------- .. py:class:: DjangoHandler(package, problem_id) Base class for handling Django models. Allows to save the package to the database and retrieve its data. :param Package package: The package to handle. :param int problem_id: The problem ID. .. py:attribute:: package .. py:attribute:: problem_id .. py:method:: save_to_db() Save the package to the database. :raises PackageAlreadyExists: If a package with the same problem ID already exists. .. py:method:: get_executable_path(program) Get the executable path for the given program. :param File | str program: The program to get the path for. :return: The executable path or None if not found. .. py:property:: short_name :type: str Short name of the problem. .. py:property:: full_name :type: str Full name of the problem. .. py:property:: lang_titles :type: dict[str, str] A dictionary of problem titles, where keys are language codes and values are titles. .. py:property:: model_solutions :type: list[dict[str, Any]] A list of model solutions, where each element is a dictionary containing a :class:`RemoteFile` object. .. py:property:: main_model_solution :type: sio3pack.files.remote_file.RemoteFile The main model solution as a :class:`RemoteFile`. .. py:property:: lang_statements :type: dict[str, sio3pack.files.remote_file.RemoteFile] A dictionary of problem statements, where keys are language codes and values are files. .. py:property:: tests :type: list[sio3pack.test.Test] A list of tests, where each element is a dictionary containing .. py:property:: workflows :type: dict[str, sio3pack.workflow.Workflow] A dictionary of workflows, where keys are workflow names and values are :class:`Workflow` objects.