Implement Insights page
This commit is contained in:
13
core/ui/views/insights.py
Normal file
13
core/ui/views/insights.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.shortcuts import render
|
||||
from django.views import View
|
||||
|
||||
|
||||
class Insights(LoginRequiredMixin, View):
|
||||
template_name = "ui/insights/insights.html"
|
||||
plan_name = "drilldown"
|
||||
|
||||
def get(self, request):
|
||||
if not request.user.has_plan(self.plan_name):
|
||||
return render(request, "denied.html")
|
||||
return render(request, self.template_name)
|
||||
Reference in New Issue
Block a user