add create contest problem
This commit is contained in:
34
contest/migrations/0003_auto_20170217_0820.py
Normal file
34
contest/migrations/0003_auto_20170217_0820.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.12 on 2017-02-17 08:20
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('contest', '0002_auto_20170209_0845'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='contestproblem',
|
||||
unique_together=set([]),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='contestproblem',
|
||||
name='contest',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='contestproblem',
|
||||
name='created_by',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='contestproblem',
|
||||
name='tags',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='ContestProblem',
|
||||
),
|
||||
]
|
||||
@@ -3,7 +3,6 @@ from django.utils.timezone import now
|
||||
from jsonfield import JSONField
|
||||
|
||||
from account.models import User
|
||||
from problem.models import AbstractProblem
|
||||
from utils.models import RichTextField
|
||||
|
||||
|
||||
@@ -61,17 +60,6 @@ class Contest(models.Model):
|
||||
db_table = "contest"
|
||||
|
||||
|
||||
class ContestProblem(AbstractProblem):
|
||||
_id = models.CharField(max_length=24, db_index=True)
|
||||
contest = models.ForeignKey(Contest)
|
||||
# 是否已经公开了题目,防止重复公开
|
||||
is_public = models.BooleanField(default=False)
|
||||
|
||||
class Meta:
|
||||
db_table = "contest_problem"
|
||||
unique_together = (("_id", "contest"), )
|
||||
|
||||
|
||||
class ContestRank(models.Model):
|
||||
user = models.ForeignKey(User)
|
||||
contest = models.ForeignKey(Contest)
|
||||
|
||||
Reference in New Issue
Block a user