forked from uncloud/uncloud
13 lines
445 B
Python
13 lines
445 B
Python
from django.views.generic.base import TemplateView
|
|
|
|
from uncloud_pay.selectors import get_balance_for_user
|
|
|
|
class UncloudIndex(TemplateView):
|
|
template_name = "uncloud/index.html"
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
print(context)
|
|
if self.request.user.is_authenticated:
|
|
context['balance'] = get_balance_for_user(self.request.user)
|
|
return context
|