mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 00:27:11 +00:00
<type>(scope): <description>
[body] [footer(s)]
This commit is contained in:
@@ -46,7 +46,7 @@ class CompetitionTask(BaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# only when "review" type
|
# only when "review" type
|
||||||
# todo make it more humanize
|
# TODO make it more humanize
|
||||||
criteries = models.JSONField(
|
criteries = models.JSONField(
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
@@ -60,10 +60,19 @@ class CompetitionTask(BaseModel):
|
|||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "задание"
|
|
||||||
verbose_name_plural = "задания"
|
verbose_name_plural = "задания"
|
||||||
|
|
||||||
|
|
||||||
|
class CompetitionTaskAttachment(BaseModel):
|
||||||
|
def file_upload_at(instance, filename):
|
||||||
|
return f"/attachment/{instance.id}/file"
|
||||||
|
|
||||||
|
task = models.ForeignKey(CompetitionTask, on_delete=models.CASCADE)
|
||||||
|
file = models.FileField(upload_to=file_upload_at)
|
||||||
|
bind_at = models.FilePathField()
|
||||||
|
public = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
class CompetitionTaskSubmission(BaseModel):
|
class CompetitionTaskSubmission(BaseModel):
|
||||||
class StatusChoices(models.TextChoices):
|
class StatusChoices(models.TextChoices):
|
||||||
SENT = "sent"
|
SENT = "sent"
|
||||||
|
|||||||
Reference in New Issue
Block a user