Test Formatter (#100)

This commit is contained in:
Bao Le 2024-01-09 02:27:20 +08:00 committed by GitHub
parent 14ecef649e
commit 04c6af1dff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1624 additions and 0 deletions

View file

@ -84,6 +84,7 @@ DMOJ_STATS_SUBMISSION_RESULT_COLORS = {
"ERR": "#ffa71c",
}
DMOJ_PROFILE_IMAGE_ROOT = "profile_images"
DMOJ_TEST_FORMATTER_ROOT = "test_formatter"
MARKDOWN_STYLES = {}
MARKDOWN_DEFAULT_STYLE = {}

View file

@ -45,6 +45,7 @@ from judge.views import (
license,
mailgun,
markdown_editor,
test_formatter,
notification,
organization,
preview,
@ -68,6 +69,9 @@ from judge.views import (
course,
email,
)
from judge.views.test_formatter import test_formatter
from judge.views.problem_data import (
ProblemDataView,
ProblemSubmissionDiff,
@ -406,11 +410,51 @@ urlpatterns = [
]
),
),
url(
r"^test_formatter/",
include(
[
url(
r"^$", test_formatter.TestFormatter.as_view(), name="test_formatter"
),
url(
r"^edit_page$",
test_formatter.EditTestFormatter.as_view(),
name="edit_page",
),
url(
r"^download_page$",
test_formatter.DownloadTestFormatter.as_view(),
name="download_page",
),
]
),
),
url(
r"^markdown_editor/",
markdown_editor.MarkdownEditor.as_view(),
name="markdown_editor",
),
url(
r"^test_formatter/",
include(
[
url(
r"^$", test_formatter.TestFormatter.as_view(), name="test_formatter"
),
url(
r"^edit_page$",
test_formatter.EditTestFormatter.as_view(),
name="edit_page",
),
url(
r"^download_page$",
test_formatter.DownloadTestFormatter.as_view(),
name="download_page",
),
]
),
),
url(
r"^submission_source_file/(?P<filename>(\w|\.)+)",
submission.SubmissionSourceFileView.as_view(),