neptune/core/ui/views/drilldown.py

18 lines
556 B
Python

from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
from django.views import View
class Drilldown(LoginRequiredMixin, View):
template_name = "ui/drilldown/drilldown.html"
plan_name = "drilldown"
def get(self, request):
if not request.user.has_plan(self.plan_name):
return render(request, "denied.html")
context = {
"sizes": settings.OPENSEARCH_MAIN_SIZES,
}
return render(request, self.template_name, context)