Begin work on Drilldown implementation

This commit is contained in:
Mark Veidemanis 2022-07-21 13:46:34 +01:00
parent 9ff2c30482
commit 6662e65c08
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 14 additions and 7 deletions

View File

@ -16,7 +16,8 @@ Including another URLconf
from django.contrib import admin
from django.urls import include, path
from core.views import Drilldown, Home, Profile, Signup
from core.views import Home, Profile, Signup
from core.ui.views.drilldown import Drilldown
urlpatterns = [
path("", Home.as_view(), name="home"),

View File

@ -0,0 +1,12 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import View
from django.shortcuts import render
class Drilldown(LoginRequiredMixin, View):
template_name = "ui/drilldown.html"
def get(self, request, *args, **kwargs):
if not request.user.has_plan("drilldown"):
return render(request, "denied.html")
return render(request, self.template_name)

View File

@ -9,13 +9,7 @@ from core.forms import NewUserForm
# Create your views here
class Drilldown(LoginRequiredMixin, View):
template_name = "ui/drilldown.html"
def get(self, request, *args, **kwargs):
if not request.user.has_plan("drilldown"):
return render(request, "denied.html")
return render(request, self.template_name)
class Home(View):