Begin work on Drilldown implementation
This commit is contained in:
parent
9ff2c30482
commit
6662e65c08
|
@ -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"),
|
||||
|
|
|
@ -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)
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue