This commit is contained in:
Egor Matveev
2021-11-20 23:15:11 +03:00
parent 9a20711820
commit 68245ffa43
89 changed files with 139 additions and 2283 deletions

View File

@@ -133,11 +133,10 @@ STATIC_URL = "/static/"
MEDIA_URL = "/media/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
DATA_ROOT = os.path.join(BASE_DIR, "data")
EXTRA_FILES_ROOT = os.path.join(BASE_DIR, "extra_files")
SOLUTIONS_ROOT_EXTERNAL = os.getenv("SOLUTIONS_ROOT_EXTERNAL", os.path.join(DATA_ROOT, "solutions"))
for root in DATA_ROOT, EXTRA_FILES_ROOT, MEDIA_ROOT:
for root in DATA_ROOT, EXTRA_FILES_ROOT:
if not os.path.exists(root):
os.mkdir(root)

View File

@@ -18,6 +18,7 @@ urlpatterns = [
path("solutions_table", SolutionsTableView.as_view()),
path("task_runtime", TaskRuntimeView.as_view()),
path("image", ImageView.as_view()),
path("send_code", SendCodeView.as_view()),
path("", MainView.as_view()),
path("admin/", admin.site.urls),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
]