后端比赛和比赛题目的部分,还有要增加和修改的地方

This commit is contained in:
hohoTT
2015-08-18 14:59:00 +08:00
parent a5211f50da
commit 937c382b25
4 changed files with 270 additions and 3 deletions

View File

@@ -32,8 +32,6 @@ class AbstractProblem(models.Model):
# last_update_time = models.DateTimeField(auto_now=True)
# 这个题是谁创建的
created_by = models.ForeignKey(User)
# 来源
source = models.CharField(max_length=30, blank=True, null=True)
# 时间限制 单位是毫秒
time_limit = models.IntegerField()
# 内存限制 单位是MB
@@ -54,3 +52,5 @@ class Problem(AbstractProblem):
difficulty = models.IntegerField()
# 标签
tags = models.ManyToManyField(ProblemTag)
# 来源
source = models.CharField(max_length=30, blank=True, null=True)

View File

@@ -164,3 +164,8 @@ class ProblemTagAdminAPITest(APITestCase):
def test_get_all_problem_tag_successfully(self):
self.assertEqual(self.client.get(self.url).data["code"], 0)
class ProblemListPageTest(TestCase):
def setUp(self):
pass