NDOJ/judge/migrations/0126_languagetemplate.py

55 lines
1.7 KiB
Python
Raw Permalink Normal View History

2022-06-12 07:57:46 +00:00
# Generated by Django 2.2.25 on 2022-06-12 06:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("judge", "0125_auto_20220602_1216"),
]
operations = [
migrations.CreateModel(
name="LanguageTemplate",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"source",
models.TextField(max_length=65536, verbose_name="source code"),
),
(
"language",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="judge.Language",
verbose_name="language",
),
),
(
"problem",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="language_templates",
to="judge.Problem",
verbose_name="problem",
),
),
],
options={
"verbose_name": "language-specific template",
"verbose_name_plural": "language-specific templates",
"unique_together": {("problem", "language")},
},
),
]