Retrieve and show user domains on the dashboard.

This commit is contained in:
Santiago Lamora 2019-10-30 14:08:14 +01:00
parent 3f07ca7f8a
commit 0650155e83
2 changed files with 14 additions and 2 deletions

View File

@ -18,10 +18,10 @@
<h1>Domains and websites</h1> <h1>Domains and websites</h1>
<p>Little description of what to be expected...</p> <p>Little description of what to be expected...</p>
{% for i in "123"|make_list %} {% for domain in domains %}
<div class="row border mt-4"> <div class="row border mt-4">
<div class="col-12 bg-light"> <div class="col-12 bg-light">
<h3>domain.com</h3> <h3>{{ domain.name }}</h3>
</div> </div>
{% for service in "123"|make_list %} {% for service in "123"|make_list %}
<div class="card" style="width: 18rem;"> <div class="card" style="width: 18rem;">

View File

@ -15,6 +15,18 @@ from .mixins import CustomContextMixin, UserTokenRequiredMixin
class DashboardView(CustomContextMixin, UserTokenRequiredMixin, TemplateView): class DashboardView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
template_name = "musician/dashboard.html" template_name = "musician/dashboard.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# TODO retrieve all data needed from orchestra
raw_domains = self.orchestra.retrieve_domains()
context.update({
'domains': raw_domains
})
return context
class LoginView(FormView): class LoginView(FormView):
template_name = 'auth/login.html' template_name = 'auth/login.html'