:py:mod:`oioioi.programs.models` ================================ .. py:module:: oioioi.programs.models Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.programs.models.ProgramsConfig oioioi.programs.models.Test oioioi.programs.models.LanguageOverrideForTest oioioi.programs.models.OutputChecker oioioi.programs.models.LibraryProblemData oioioi.programs.models.ModelSolutionsManager oioioi.programs.models.ModelSolution oioioi.programs.models.ProgramSubmission oioioi.programs.models.ModelProgramSubmission oioioi.programs.models.CompilationReport oioioi.programs.models.TestReport oioioi.programs.models.GroupReport oioioi.programs.models.ReportActionsConfig oioioi.programs.models.UserOutGenStatus oioioi.programs.models.ProblemCompiler oioioi.programs.models.ContestCompiler oioioi.programs.models.ProblemAllowedLanguage Functions ~~~~~~~~~ .. autoapisummary:: oioioi.programs.models.validate_time_limit oioioi.programs.models.validate_memory_limit oioioi.programs.models._decide_if_autocreate_model_submissions_for_problem_instance oioioi.programs.models._autocreate_model_submissions_for_problem_instance oioioi.programs.models._autocreate_model_submissions_for_model_solutions oioioi.programs.models.make_submission_filename oioioi.programs.models.make_output_filename oioioi.programs.models._autocreate_problem_compilers_for_problem oioioi.programs.models.check_compilers_config Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.programs.models.execution_mode_options oioioi.programs.models.test_kinds oioioi.programs.models.model_solution_kinds .. py:data:: execution_mode_options .. py:class:: ProgramsConfig(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: contest .. py:attribute:: execution_mode .. py:data:: test_kinds .. py:function:: validate_time_limit(value) .. py:function:: validate_memory_limit(value) .. py:class:: Test(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: ordering :annotation: = ['order'] .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: unique_together :annotation: = ['problem_instance', 'name'] .. py:property:: problem .. py:attribute:: __test__ :annotation: = False .. py:attribute:: problem_instance .. py:attribute:: name .. py:attribute:: input_file .. py:attribute:: output_file .. py:attribute:: kind .. py:attribute:: group .. py:attribute:: time_limit .. py:attribute:: memory_limit .. py:attribute:: max_score .. py:attribute:: order .. py:attribute:: is_active .. py:method:: __str__() Return str(self). .. py:class:: LanguageOverrideForTest(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: ordering :annotation: = ['test__order'] .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: unique_together :annotation: = ['test', 'language'] .. py:attribute:: test .. py:attribute:: time_limit .. py:attribute:: memory_limit .. py:attribute:: language .. py:class:: OutputChecker(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: problem .. py:attribute:: exe_file .. py:class:: LibraryProblemData(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: problem .. py:attribute:: libname .. py:data:: model_solution_kinds .. py:class:: ModelSolutionsManager Bases: :py:obj:`django.db.models.Manager` .. py:method:: recreate_model_submissions(problem_instance, model_solution=None) .. py:class:: ModelSolution(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:property:: short_name .. py:attribute:: objects .. py:attribute:: problem .. py:attribute:: name .. py:attribute:: source_file .. py:attribute:: kind .. py:attribute:: order_key .. py:function:: _decide_if_autocreate_model_submissions_for_problem_instance(sender, instance, raw, **kwargs) .. py:function:: _autocreate_model_submissions_for_problem_instance(sender, instance, created, raw, **kwargs) .. py:function:: _autocreate_model_submissions_for_model_solutions(sender, instance, created, raw, **kwargs) .. py:function:: make_submission_filename(instance, filename) .. py:class:: ProgramSubmission(*args, **kwargs) Bases: :py:obj:`oioioi.contests.models.Submission` Make subclasses preserve the alters_data attribute on overridden methods. .. py:property:: extension .. py:attribute:: source_file .. py:attribute:: source_length .. py:method:: save(*args, **kwargs) Save the current instance. Override this in a subclass if you want to control the saving process. The 'force_insert' and 'force_update' parameters can be used to insist that the "save" must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set. .. py:method:: get_language_display() .. py:class:: ModelProgramSubmission(*args, **kwargs) Bases: :py:obj:`ProgramSubmission` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: model_solution .. py:class:: CompilationReport(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: submission_report .. py:attribute:: status .. py:attribute:: compiler_output .. py:function:: make_output_filename(instance, filename) .. py:class:: TestReport(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: __test__ :annotation: = False .. py:attribute:: submission_report .. py:attribute:: status .. py:attribute:: comment .. py:attribute:: score .. py:attribute:: max_score .. py:attribute:: time_used .. py:attribute:: output_file .. py:attribute:: test .. py:attribute:: test_name .. py:attribute:: test_group .. py:attribute:: test_time_limit .. py:class:: GroupReport(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: submission_report .. py:attribute:: group .. py:attribute:: score .. py:attribute:: max_score .. py:attribute:: status .. py:class:: ReportActionsConfig(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: problem .. py:attribute:: can_user_generate_outs .. py:class:: UserOutGenStatus(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: testreport .. py:attribute:: status .. py:attribute:: visible_for_user .. py:class:: ProblemCompiler(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Represents compiler used for a given language for this problem. This can be altered by contest specific compilers. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: ordering :annotation: = ['problem'] .. py:attribute:: unique_together :annotation: = ['problem', 'language'] .. py:attribute:: problem .. py:attribute:: language .. py:attribute:: compiler .. py:attribute:: auto_created .. py:function:: _autocreate_problem_compilers_for_problem(sender, instance, created, raw, using, **kwargs) .. py:class:: ContestCompiler(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Represents compilers set for languages in different contests. This is used to allow overriding problems' compilers inside a contest. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: ordering :annotation: = ['contest'] .. py:attribute:: unique_together :annotation: = ['contest', 'language'] .. py:attribute:: contest .. py:attribute:: language .. py:attribute:: compiler .. py:class:: ProblemAllowedLanguage(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Represents allowed language for specific problem. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: ordering :annotation: = ['problem'] .. py:attribute:: unique_together :annotation: = ['problem', 'language'] .. py:attribute:: problem .. py:attribute:: language .. py:function:: check_compilers_config()