mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 21:27:10 +00:00
Merge branch 'master' of https://gitlab.prodcontest.ru/team-15/project
This commit is contained in:
@@ -54,7 +54,7 @@ root_url = https://prod-team-15-2pc0i3lc.final.prodcontest.ru/admin/grafana
|
||||
serve_from_sub_path = true
|
||||
|
||||
# Log web requests
|
||||
router_logging = false
|
||||
router_logging = true
|
||||
|
||||
# the path relative working path
|
||||
static_root_path = public
|
||||
|
||||
@@ -183,8 +183,8 @@ http {
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
|
||||
location /admin/grafana/ {
|
||||
proxy_pass http://grafana:3000/;
|
||||
location /admin/grafana {
|
||||
proxy_pass http://grafana:3000/admin/grafana;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
@@ -38,6 +38,7 @@ class SubmissionOut(ModelSchema):
|
||||
competition_name: str = Field(..., alias="task.competition.title")
|
||||
task_position: int = Field(..., alias="task.in_competition_position")
|
||||
task_title: str = Field(..., alias="task.title")
|
||||
description: str = Field(..., alias="task.description")
|
||||
|
||||
@staticmethod
|
||||
def resolve_criteries(self, context) -> list[CriteriaOut] | None:
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,7 @@ import random
|
||||
import uuid
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.hashers import make_password
|
||||
from django.core.files.base import ContentFile
|
||||
from django.core.management.base import BaseCommand
|
||||
@@ -60,6 +61,17 @@ E — коэффициент чувствительности количеств
|
||||
{
|
||||
"obj": None,
|
||||
"title": "Задача 2",
|
||||
"description": """
|
||||
Напишите "hello_dano" на питоне
|
||||
""".strip(),
|
||||
"type": CompetitionTask.CompetitionTaskType.CHECKER.value,
|
||||
"points": 25,
|
||||
"submission_reviewers_count": 2,
|
||||
"max_attempts": 50,
|
||||
},
|
||||
{
|
||||
"obj": None,
|
||||
"title": "Задача 3",
|
||||
"description": """Небольшой интернет-магазин собрал данные о действиях пользователей на своем сайте
|
||||
за последние несколько месяцев.
|
||||
ecommerce_logs.csv — журнал действий пользователей:
|
||||
@@ -135,17 +147,6 @@ ecommerce_logs.csv — журнал действий пользователей:
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"obj": None,
|
||||
"title": "Задача 3",
|
||||
"description": """
|
||||
Напишите "hello_dano" на питоне
|
||||
""".strip(),
|
||||
"type": CompetitionTask.CompetitionTaskType.CHECKER.value,
|
||||
"points": 25,
|
||||
"submission_reviewers_count": 2,
|
||||
"max_attempts": 50,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -196,7 +197,7 @@ ecommerce_logs.csv — журнал действий пользователей:
|
||||
},
|
||||
{
|
||||
"obj": None,
|
||||
"title": "Задача 4",
|
||||
"title": "Задача 3",
|
||||
"description": """
|
||||
Напишите выведите 1+3 на питоне
|
||||
""".strip(),
|
||||
@@ -349,15 +350,19 @@ class Command(BaseCommand):
|
||||
if task.type == CompetitionTask.CompetitionTaskType.REVIEW.value:
|
||||
num_submissions = random.randint(1, 3)
|
||||
for m in range(num_submissions):
|
||||
dummy_content = ContentFile(
|
||||
dummy_content_txt = ContentFile(
|
||||
b"otvet: 112 sto proc" ,
|
||||
name=f"submission_{uuid.uuid4().hex}.txt",
|
||||
)
|
||||
submission = CompetitionTaskSubmission.objects.create(
|
||||
user=user,
|
||||
task=task,
|
||||
content=dummy_content,
|
||||
)
|
||||
|
||||
content_dir = f"{settings.BASE_DIR}/apps/core/contents"
|
||||
with open(f"{content_dir}/presentation.pptx", "rb") as f:
|
||||
files = [f, f, dummy_content_txt]
|
||||
submission = CompetitionTaskSubmission.objects.create(
|
||||
user=user,
|
||||
task=task,
|
||||
content=random.choice(files),
|
||||
)
|
||||
submission.save()
|
||||
submission.send_on_review()
|
||||
self.stdout.write(
|
||||
|
||||
Reference in New Issue
Block a user