Merge branch 'master' of gitlab.prodcontest.ru:team-15/project

This commit is contained in:
ITQ
2025-03-04 00:45:36 +03:00
+4 -1
View File
@@ -3,6 +3,7 @@ from uuid import uuid4
from django.db import models from django.db import models
from django.db.models import Count, Q from django.db.models import Count, Q
from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from mdeditor.fields import MDTextField from mdeditor.fields import MDTextField
@@ -149,7 +150,9 @@ class CompetitionTaskAttachment(BaseModel):
related_name="attachments", related_name="attachments",
) )
file = models.FileField(upload_to=file_upload_at, verbose_name="файл") file = models.FileField(upload_to=file_upload_at, verbose_name="файл")
bind_at = models.CharField(verbose_name="путь сохранения", max_length=255) bind_at = models.CharField(verbose_name="путь сохранения", max_length=255,
validators=[RegexValidator(r"^(?:[a-zA-Z]:\\(?:[^<>:\"\/\\|?*]*\\)*|/(?:[^<>:\"\/\\|?*]+/?)*)$",
message="Введите абсолютный путь до папки")])
public = models.BooleanField(default=False, verbose_name="публичный") public = models.BooleanField(default=False, verbose_name="публичный")
class Meta: class Meta: