NDOJ/judge/migrations/0120_auto_20220306_1124.py

76 lines
2.4 KiB
Python
Raw Normal View History

2022-03-10 05:38:29 +00:00
# Generated by Django 2.2.25 on 2022-03-06 04:24
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
2022-05-14 17:57:27 +00:00
("judge", "0119_auto_20220306_0512"),
2022-03-10 05:38:29 +00:00
]
operations = [
migrations.AddField(
2022-05-14 17:57:27 +00:00
model_name="profile",
name="is_banned_problem_voting",
field=models.BooleanField(
default=False,
help_text="User will not be able to vote on problems' point values.",
verbose_name="banned from voting",
),
2022-03-10 05:38:29 +00:00
),
migrations.CreateModel(
2022-05-14 17:57:27 +00:00
name="ProblemPointsVote",
2022-03-10 05:38:29 +00:00
fields=[
2022-05-14 17:57:27 +00:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"points",
models.IntegerField(
help_text="The amount of points you think this problem deserves.",
validators=[
django.core.validators.MinValueValidator(100),
django.core.validators.MaxValueValidator(600),
],
verbose_name="proposed point value",
),
),
(
"vote_time",
models.DateTimeField(
auto_now_add=True, verbose_name="The time this vote was cast"
),
),
(
"problem",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="problem_points_votes",
to="judge.Problem",
),
),
(
"voter",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="problem_points_votes",
to="judge.Profile",
),
),
2022-03-10 05:38:29 +00:00
],
options={
2022-05-14 17:57:27 +00:00
"verbose_name": "vote",
"verbose_name_plural": "votes",
2022-03-10 05:38:29 +00:00
},
),
]