Files
cmhub/apps/portal/views.py
T

14 lines
449 B
Python
Raw Normal View History

2026-07-03 11:27:45 +08:00
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
2026-07-02 09:07:15 +08:00
2026-07-03 11:27:45 +08:00
from apps.billing.services import get_balance_snapshot
class DashboardView(LoginRequiredMixin, TemplateView):
template_name = "portal/dashboard.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["balance"] = get_balance_snapshot(self.request.user)
return context