Skip to content

Commit

Permalink
update file for service
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Jan 6, 2024
1 parent c3d1447 commit dbf7324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions dmoj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ def paged_list_view(view, name):
path('find', user.user_ranking_redirect, name='user_ranking_redirect'),
])),

path('user', user.UserAboutPage.as_view(), name='user_page'),
path('user', user.UserDashboard.as_view(), name='user_dashboard'),
path('edit/profile/', user.edit_profile, name='user_edit_profile'),
path('data/prepare/', user.UserPrepareData.as_view(), name='user_prepare_data'),
path('data/download/', user.UserDownloadData.as_view(), name='user_download_data'),
path('user/<str:user>', include([
path('', user.UserAboutPage.as_view(), name='user_page'),
path('', user.UserDashboard.as_view(), name='user_dashboard'),
path('/solved', include([
path('', user.UserProblemsPage.as_view(), name='user_problems'),
path('/ajax', user.UserPerformancePointsAjax.as_view(), name='user_pp_ajax'),
Expand All @@ -175,7 +175,7 @@ def paged_list_view(view, name):
path('/submissions/', lambda _, user:
HttpResponsePermanentRedirect(reverse('all_user_submissions', args=[user]))),

path('/', lambda _, user: HttpResponsePermanentRedirect(reverse('user_page', args=[user]))),
path('/', lambda _, user: HttpResponsePermanentRedirect(reverse('user_dashboard', args=[user]))),
])),

path('comments/upvote/', comment.upvote_comment, name='comment_upvote'),
Expand All @@ -189,7 +189,7 @@ def paged_list_view(view, name):
path('render', comment.CommentContent.as_view(), name='comment_content'),
])),

path('contests/', paged_list_view(contests.ContestList, 'contest_list')),
path('contests/',contests.ContestList.as_view(), name='contest_list'), # if broken add $ to end of regex and make regex
path('contests.ics', contests.ContestICal.as_view(), name='contest_ical'),
path('contests/<int:year>/<int:month>/', contests.ContestCalendar.as_view(), name='contest_calendar'),
re_path(r'^contests/tag/(?P<name>[a-z-]+)', include([
Expand All @@ -204,6 +204,7 @@ def paged_list_view(view, name):
path('/clone', contests.ContestClone.as_view(), name='contest_clone'),
path('/ranking/', contests.ContestRanking.as_view(), name='contest_ranking'),
path('/ranking/ajax', contests.contest_ranking_ajax, name='contest_ranking_ajax'),
path('/register', contests.ContestRegister.as_view(), name='contest_register'),
path('/join', contests.ContestJoin.as_view(), name='contest_join'),
path('/leave', contests.ContestLeave.as_view(), name='contest_leave'),
path('/stats', contests.ContestStats.as_view(), name='contest_stats'),
Expand Down
9 changes: 5 additions & 4 deletions judge/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.contrib.flatpages.models import FlatPage

from judge.admin.comments import CommentAdmin
from judge.admin.contest import ContestAdmin, ContestParticipationAdmin, ContestTagAdmin
from judge.admin.contest import ContestAdmin, ContestParticipationAdmin, ContestRegistrationAdmin, ContestTagAdmin
from judge.admin.interface import BlogPostAdmin, FlatPageAdmin, LicenseAdmin, LogEntryAdmin, NavigationBarAdmin
from judge.admin.organization import ClassAdmin, OrganizationAdmin, OrganizationRequestAdmin
from judge.admin.problem import ProblemAdmin, ProblemPointsVoteAdmin
Expand All @@ -13,15 +13,16 @@
from judge.admin.submission import SubmissionAdmin
from judge.admin.taxon import ProblemGroupAdmin, ProblemTypeAdmin
from judge.admin.ticket import TicketAdmin
from judge.models import BlogPost, Class, Comment, CommentLock, Contest, ContestParticipation, \
ContestTag, Judge, Language, License, MiscConfig, NavigationBar, Organization, \
OrganizationRequest, Problem, ProblemGroup, ProblemPointsVote, ProblemType, Profile, Submission, Ticket
from judge.models import BlogPost, Comment, CommentLock, Contest, ContestParticipation, \
ContestRegistration, ContestTag, Judge, Language, License, MiscConfig, NavigationBar, \
Organization, OrganizationRequest, Problem, ProblemGroup, ProblemType, Profile, Submission, Ticket

admin.site.register(BlogPost, BlogPostAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(CommentLock)
admin.site.register(Contest, ContestAdmin)
admin.site.register(ContestParticipation, ContestParticipationAdmin)
admin.site.register(ContestRegistration, ContestRegistrationAdmin)
admin.site.register(ContestTag, ContestTagAdmin)
admin.site.unregister(FlatPage)
admin.site.register(FlatPage, FlatPageAdmin)
Expand Down

0 comments on commit dbf7324

Please sign in to comment.