cmsmanage/dashboard/views.py

15 lines
413 B
Python

from django.views.generic.base import TemplateView
from dashboard import DASHBOARD_CARDS
class DashboardView(TemplateView):
template_name = "dashboard/dashboard.dj.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["apps"] = {
name: card(self.request) for name, card in DASHBOARD_CARDS.items()
}
return context