Forms and input pre-processing

Creation forms

NewContestForm

class judge.forms.NewContestForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form for creating a new Contest.

contest_name = None

Contest Name

contest_start = None

Contest Start Timestamp

contest_soft_end = None

Contest Soft End Timestamp

contest_hard_end = None

Contest Hard End Timestamp

penalty = None

Contest Penalty factor

is_public = None

Contest is_public property

enable_linter_score = None

Contest enable_linter_score property

enable_poster_score = None

Contest enable_poster_score property

clean()

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

NewProblemForm

class judge.forms.NewProblemForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form for adding a new Problem.

code = None

Problem Code Field

name = None

Problem Name Field

statement = None

Problem Statement Field

input_format = None

Problem Input Format Field

output_format = None

Problem Output Format Field

difficulty = None

Problem Difficulty Field

time_limit = None

Problem Time limit

memory_limit = None

Problem Memory limit

file_exts = None

Problem File Extensions

starting_code = None

Problem Starting code

max_score = None

Problem Max Score

compilation_script = None

Problem Compilation Script

test_script = None

Problem Test Script

NewSubmissionForm

class judge.forms.NewSubmissionForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to create a new Submission.

file_type = None

Choices of file type

submission_file = None

Submission File

NewCommentForm

class judge.forms.NewCommentForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to add a new comment

participant_email = None

Email of participant

comment = None

Comment content

Extension forms

AddPersonToContestForm

class judge.forms.AddPersonToContestForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to add a Person to a Contest.

emails = None

Email ID of the person

AddTestCaseForm

class judge.forms.AddTestCaseForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to create a new TestCase

test_type = None

TestCase Type

input_file = None

TestCase Input

output_file = None

TestCase Output

AddPosterScoreForm

class judge.forms.AddPosterScoreForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to add poster score for a submission

score = None

Score field

Updation forms

UpdateContestForm

class judge.forms.UpdateContestForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to update the timeline of the Contest

contest_start = None

Contest Start Timestamp

contest_soft_end = None

Contest Soft End Timestamp

contest_hard_end = None

Contest Hard End Timestamp

clean()

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

EditProblemForm

class judge.forms.EditProblemForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form for editing an existing problem.

name = None

Problem Name Field

statement = None

Problem Statement Field

input_format = None

Problem Input Format Field

output_format = None

Problem Output Format Field

difficulty = None

Problem Difficulty Field

Deletion forms

DeletePersonFromContestForm

class judge.forms.DeletePersonFromContestForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Form to remove a Person from a Contest.

email = None

Email ID of the person