Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dmoj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from judge.views import TitledTemplateView, api, blog, comment, contests, language, license, mailgun, organization, \
preview, problem, problem_download, problem_manage, ranked_submission, register, stats, status, submission, tag, \
tasks, ticket, two_factor, user, widgets
from judge.views.submission_v2 import AllSubmissions, AllSubmissionsPage
from judge.views.magazine import MagazinePage
from judge.views.misc_config import MiscConfigEdit
from judge.views.problem_data import ProblemDataView, ProblemSubmissionDiff, \
Expand Down Expand Up @@ -177,7 +178,8 @@ def paged_list_view(view, name):
path('/', lambda _, tagproblem: HttpResponsePermanentRedirect(reverse('tagproblem_detail', args=[tagproblem]))),
])),

path('submissions/', paged_list_view(submission.AllSubmissions, 'all_submissions')),
path('submissions/', AllSubmissions.as_view(), name='all_submissions'),
path('submissions/page', AllSubmissionsPage.as_view(), name='all_submissions_page'),
path('submissions/diff', submission.SubmissionSourceDiff, name='diff_submissions'),
path('submissions/user/<str:user>/', paged_list_view(submission.AllUserSubmissions, 'all_user_submissions')),

Expand Down
4 changes: 4 additions & 0 deletions judge/jinja2/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def link_user(user):
user, profile = user.user, user
elif isinstance(user, AbstractUser):
profile = user.profile
elif type(user).__name__ == 'ContestRankingProfile':
user, profile = user.user, user
elif type(user).__name__ == 'ProfileDTO':
user, profile = user.user, user
else:
raise ValueError('Expected profile or user, got %s' % (type(user),))

Expand Down
2 changes: 2 additions & 0 deletions judge/jinja2/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# TODO: maybe refactor this?
def get_editor_ids(contest):
if hasattr(contest, 'editor_ids'):
return contest.editor_ids
return set(map(attrgetter('id'), contest.authors.all())) | set(map(attrgetter('id'), contest.curators.all()))


Expand Down
1 change: 1 addition & 0 deletions judge/repositories/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Loading