from django.views.generic import TemplateView from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required, user_passes_test from ..mixins import KumiMixin @method_decorator(user_passes_test(lambda u: u.is_superuser), name='dispatch') class DevView(KumiMixin, TemplateView): """A view that renders the base template """ template_name = "frontend/base.html" @method_decorator(login_required, name='dispatch') class DashboardView(KumiMixin, TemplateView): """A view that renders the dashboard template """ title = "Dashboard" template_name = "frontend/dashboard.html"