14 lines
449 B
Python
14 lines
449 B
Python
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
from django.views.generic import TemplateView
|
|
|
|
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
|