add resolver link
This commit is contained in:
parent
fe9b899232
commit
cf431b8fab
3 changed files with 15 additions and 9 deletions
|
@ -1099,7 +1099,7 @@ urlpatterns = [
|
|||
]
|
||||
),
|
||||
),
|
||||
url(r"^resolver/", resolver.resolver, name="resolver"),
|
||||
url(r"^resolver/(?P<contest>\w+)",resolver.resolver, name="resolver")
|
||||
] + url_static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
# if hasattr(settings, "INTERNAL_IPS"):
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
from django.shortcuts import render
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from django.http import HttpResponseForbidden
|
||||
|
||||
def resolver(request):
|
||||
if request.user.is_superuser:
|
||||
return render(
|
||||
request,
|
||||
"resolver/resolver.html",
|
||||
|
@ -10,3 +11,5 @@ def resolver(request):
|
|||
"title": _("Resolver"),
|
||||
},
|
||||
)
|
||||
return HttpResponseForbidden()
|
||||
|
|
@ -22,6 +22,9 @@
|
|||
{{ make_tab_item('ranking', 'fa fa-bar-chart', None, _('Hidden Rankings')) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
{{ make_tab_item('resolver', 'fa fa-check', url('resolver', contest.key), _('Resolver')) }}
|
||||
{% endif %}
|
||||
{% if can_edit %}
|
||||
{% if perms.judge.moss_contest and has_moss_api_key %}
|
||||
{{ make_tab_item('moss', 'fa fa-gavel', url('contest_moss', contest.key), _('MOSS')) }}
|
||||
|
|
Loading…
Reference in a new issue