修改和删除 contest 和 problem 部分字段
This commit is contained in:
24
problem/migrations/0010_auto_20151017_1226.py
Normal file
24
problem/migrations/0010_auto_20151017_1226.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('problem', '0009_auto_20151008_1125'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='problem',
|
||||
name='last_update_time',
|
||||
field=models.DateTimeField(null=True, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='problem',
|
||||
name='source',
|
||||
field=models.CharField(max_length=200, null=True, blank=True),
|
||||
),
|
||||
]
|
||||
20
problem/migrations/0011_auto_20151017_1227.py
Normal file
20
problem/migrations/0011_auto_20151017_1227.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import utils.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('problem', '0010_auto_20151017_1226'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='problem',
|
||||
name='hint',
|
||||
field=utils.models.RichTextField(null=True, blank=True),
|
||||
),
|
||||
]
|
||||
@@ -26,11 +26,12 @@ class AbstractProblem(models.Model):
|
||||
# 测试用例id 这个id 可以用来拼接得到测试用例的文件存储位置
|
||||
test_case_id = models.CharField(max_length=40)
|
||||
# 提示
|
||||
hint = models.TextField(blank=True, null=True)
|
||||
hint = RichTextField(blank=True, null=True)
|
||||
# 创建时间
|
||||
create_time = models.DateTimeField(auto_now_add=True)
|
||||
# 最后更新时间
|
||||
# last_update_time = models.DateTimeField(auto_now=True)
|
||||
# 最后更新时间,不适用auto_now,因为本 model 里面的提交数量是变化的,导致每次 last_update_time 也更新了
|
||||
# 需要每次编辑后手动赋值
|
||||
last_update_time = models.DateTimeField(blank=True, null=True)
|
||||
# 这个题是谁创建的
|
||||
created_by = models.ForeignKey(User)
|
||||
# 时间限制 单位是毫秒
|
||||
@@ -63,4 +64,4 @@ class Problem(AbstractProblem):
|
||||
# 标签
|
||||
tags = models.ManyToManyField(ProblemTag)
|
||||
# 来源
|
||||
source = models.CharField(max_length=30, blank=True, null=True)
|
||||
source = models.CharField(max_length=200, blank=True, null=True)
|
||||
|
||||
Reference in New Issue
Block a user