oioioi.problems.forms

Module Contents

Classes

ProblemUploadForm

A collection of Fields, plus their associated data.

PackageUploadForm

A collection of Fields, plus their associated data.

ProblemStatementConfigForm

The main implementation of all the Form logic. Note that this class is

RankingVisibilityConfigForm

The main implementation of all the Form logic. Note that this class is

RegistrationAvailabilityConfigForm

The main implementation of all the Form logic. Note that this class is

ProblemSiteForm

The main implementation of all the Form logic. Note that this class is

ProblemsetSourceForm

A collection of Fields, plus their associated data.

ProblemStatementReplaceForm

A collection of Fields, plus their associated data.

PackageFileReuploadForm

A collection of Fields, plus their associated data.

ProblemNameInlineFormSet

A formset for child objects related to a parent.

LocalizationFormset

A formset for child objects related to a parent.

OriginInfoValueForm

The main implementation of all the Form logic. Note that this class is

OriginTagThroughForm

The main implementation of all the Form logic. Note that this class is

OriginInfoValueThroughForm

The main implementation of all the Form logic. Note that this class is

DifficultyTagThroughForm

The main implementation of all the Form logic. Note that this class is

AlgorithmTagThroughForm

The main implementation of all the Form logic. Note that this class is

Functions

class oioioi.problems.forms.ProblemUploadForm(contest, existing_problem, *args, **kwargs)[source]

Bases: django.forms.Form

A collection of Fields, plus their associated data.

contest_id[source]
clean()[source]

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__’.

class oioioi.problems.forms.PackageUploadForm(contest, existing_problem, *args, **kwargs)[source]

Bases: ProblemUploadForm

A collection of Fields, plus their associated data.

package_file[source]
class oioioi.problems.forms.ProblemStatementConfigForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

fields = __all__[source]
model[source]
widgets[source]
class oioioi.problems.forms.RankingVisibilityConfigForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

fields = __all__[source]
model[source]
widgets[source]
class oioioi.problems.forms.RegistrationAvailabilityConfigForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

fields = __all__[source]
model[source]
widgets[source]
class oioioi.problems.forms.ProblemSiteForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

fields = ['url_key'][source]
model[source]
widgets[source]
class oioioi.problems.forms.ProblemsetSourceForm(url_key, *args, **kwargs)[source]

Bases: django.forms.Form

A collection of Fields, plus their associated data.

url_key[source]
class oioioi.problems.forms.ProblemStatementReplaceForm(file_names, *args, **kwargs)[source]

Bases: django.forms.Form

A collection of Fields, plus their associated data.

file_name[source]
file_replacement[source]
_set_field_show_always(field_name)[source]
class oioioi.problems.forms.PackageFileReuploadForm(file_names, *args, **kwargs)[source]

Bases: django.forms.Form

A collection of Fields, plus their associated data.

file_name[source]
file_replacement[source]
_set_field_show_always(field_name)[source]
oioioi.problems.forms._localized_formset_get_initial(localized_objects)[source]
class oioioi.problems.forms.ProblemNameInlineFormSet(*args, **kwargs)[source]

Bases: django.forms.models.BaseInlineFormSet

A formset for child objects related to a parent.

class oioioi.problems.forms.LocalizationFormset(*args, **kwargs)[source]

Bases: django.forms.models.BaseInlineFormSet

A formset for child objects related to a parent.

class oioioi.problems.forms.OriginInfoValueForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

model[source]
fields = ['category', 'value', 'order', 'problems'][source]
exclude = ['parent_tag'][source]
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

oioioi.problems.forms._label_from_instance(obj)[source]
class oioioi.problems.forms.OriginTagThroughForm(*args, **kwargs)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

labels[source]
help_texts[source]
class oioioi.problems.forms.OriginInfoValueThroughForm(*args, **kwargs)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

labels[source]
help_texts[source]
class oioioi.problems.forms.DifficultyTagThroughForm(*args, **kwargs)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

labels[source]
help_texts[source]
class oioioi.problems.forms.AlgorithmTagThroughForm(*args, **kwargs)[source]

Bases: django.forms.ModelForm

The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class.

class Meta[source]

Bases: object

labels[source]
help_texts[source]