contest and contest_problems api.

add ordering for contest and submission models
This commit is contained in:
zemal
2017-07-17 21:28:06 +08:00
parent ee2f5f5dd7
commit 53d0cae8ea
13 changed files with 160 additions and 25 deletions

View File

@@ -12,9 +12,9 @@ class ContestType(object):
class ContestStatus(object):
CONTEST_NOT_START = "Not Started"
CONTEST_ENDED = "Ended"
CONTEST_UNDERWAY = "Underway"
CONTEST_NOT_START = "1"
CONTEST_ENDED = "-1"
CONTEST_UNDERWAY = "0"
class ContestRuleType(object):
@@ -58,6 +58,7 @@ class Contest(models.Model):
class Meta:
db_table = "contest"
ordering = ("create_time",)
class ContestRank(models.Model):