From e72c7c3a9a37893a49f1275534d510cfd33738e0 Mon Sep 17 00:00:00 2001 From: Dinh Date: Thu, 23 Jan 2020 20:39:19 -0600 Subject: [PATCH] fix lint errors --- .../{0098_auto_20200123_2136.py => 0098_default_changes.py} | 2 +- .../{0099_auto_20200123_2228.py => 0100_custom_checker.py} | 2 +- judge/models/problem_data.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) rename judge/migrations/{0098_auto_20200123_2136.py => 0098_default_changes.py} (100%) rename judge/migrations/{0099_auto_20200123_2228.py => 0100_custom_checker.py} (100%) diff --git a/judge/migrations/0098_auto_20200123_2136.py b/judge/migrations/0098_default_changes.py similarity index 100% rename from judge/migrations/0098_auto_20200123_2136.py rename to judge/migrations/0098_default_changes.py index 87f54c1..333c67c 100644 --- a/judge/migrations/0098_auto_20200123_2136.py +++ b/judge/migrations/0098_default_changes.py @@ -1,8 +1,8 @@ # Generated by Django 2.2.9 on 2020-01-23 21:36 import django.core.validators -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/judge/migrations/0099_auto_20200123_2228.py b/judge/migrations/0100_custom_checker.py similarity index 100% rename from judge/migrations/0099_auto_20200123_2228.py rename to judge/migrations/0100_custom_checker.py index 3666752..b2552b7 100644 --- a/judge/migrations/0099_auto_20200123_2228.py +++ b/judge/migrations/0100_custom_checker.py @@ -1,6 +1,6 @@ # Generated by Django 2.2.9 on 2020-01-23 22:28 - from django.db import migrations, models + import judge.models.problem_data import judge.utils.problem_data diff --git a/judge/models/problem_data.py b/judge/models/problem_data.py index 8c46ff3..6f6c88c 100644 --- a/judge/models/problem_data.py +++ b/judge/models/problem_data.py @@ -46,7 +46,10 @@ class ProblemData(models.Model): checker = models.CharField(max_length=10, verbose_name=_('checker'), choices=CHECKERS, blank=True) checker_args = models.TextField(verbose_name=_('checker arguments'), blank=True, help_text=_('checker arguments as a JSON object')) - custom_checker = models.FileField(verbose_name=_('custom checker file'), storage=problem_data_storage, null=True, blank=True, + custom_checker = models.FileField(verbose_name=_('custom checker file'), + storage=problem_data_storage, + null=True, + blank=True, upload_to=problem_directory_file, validators=[FileExtensionValidator(allowed_extensions=['py'])]) __original_zipfile = None