2022-12-19 01:01:02 +00:00
|
|
|
from django.views.generic import TemplateView
|
2022-12-18 23:53:28 +00:00
|
|
|
from django.utils.translation import gettext as _
|
2022-12-19 00:22:08 +00:00
|
|
|
from django.http import HttpResponseForbidden
|
2022-12-18 23:53:28 +00:00
|
|
|
|
2022-12-20 08:24:24 +00:00
|
|
|
|
2022-12-19 01:01:02 +00:00
|
|
|
class Resolver(TemplateView):
|
|
|
|
title = _("Resolver")
|
|
|
|
template_name = "resolver/resolver.html"
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
context = super(Resolver, self).get_context_data(**kwargs)
|
|
|
|
context["contest_json"] = "/static/contest.json"
|
|
|
|
return context
|
|
|
|
|
|
|
|
def get(self, request, *args, **kwargs):
|
|
|
|
if request.user.is_superuser:
|
|
|
|
return super(Resolver, self).get(request, *args, **kwargs)
|
|
|
|
return HttpResponseForbidden()
|