oioioi.contests.fields

Module Contents

Classes

ScoreField

Model field for storing :class:`~oioioi.contests.scores.ScoreValue`s

class oioioi.contests.fields.ScoreField(*args, **kwargs)[source]

Bases: django.db.models.CharField

Model field for storing :class:`~oioioi.contests.scores.ScoreValue`s

description[source]
get_prep_value(value)[source]

Perform preliminary non-db specific value checks and conversions.

from_db_value(value, expression, connection, context=None)[source]
value_to_string(obj)[source]

Return a string value of this field from the passed obj. This is used by the serialization framework.

to_python(value)[source]

Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can’t be converted. Return the converted value. Subclasses should override this.