From bb4fc5e26787890772bb5808c301afe8b76c6cd6 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Tue, 23 Apr 2024 17:14:39 +0200 Subject: [PATCH] musician websites visualizacion --- orchestra/contrib/musician/urls.py | 1 + orchestra/contrib/musician/views.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/orchestra/contrib/musician/urls.py b/orchestra/contrib/musician/urls.py index c157aac4..c0250880 100644 --- a/orchestra/contrib/musician/urls.py +++ b/orchestra/contrib/musician/urls.py @@ -44,4 +44,5 @@ urlpatterns = [ path('webappuser//change-password/', views.WebappUserChangePasswordView.as_view(), name='webappuser-password'), path('systemusers/', views.SystemUserListView.as_view(), name='systemuser-list'), path('systemuser//change-password/', views.SystemUserChangePasswordView.as_view(), name='systemuser-password'), + path('websites/', views.WebsiteListView.as_view(), name='website-list'), ] diff --git a/orchestra/contrib/musician/views.py b/orchestra/contrib/musician/views.py index 00077c52..fd211128 100644 --- a/orchestra/contrib/musician/views.py +++ b/orchestra/contrib/musician/views.py @@ -33,6 +33,7 @@ from orchestra.contrib.mailboxes.models import Address, Mailbox from orchestra.contrib.resources.models import Resource, ResourceData from orchestra.contrib.saas.models import SaaS from orchestra.contrib.systemusers.models import WebappUsers, SystemUser +from orchestra.contrib.websites.models import Website from orchestra.utils.html import html_to_pdf from .auth import logout as auth_logout @@ -649,4 +650,12 @@ class SystemUserChangePasswordView(CustomContextMixin, UserTokenRequiredMixin, U success_url = reverse_lazy("musician:systemuser-list") def get_queryset(self): - return self.model.objects.filter(account=self.request.user) \ No newline at end of file + return self.model.objects.filter(account=self.request.user) + +class WebsiteListView(ServiceListView): + model = Website + template_name = "musician/website_list.html" + extra_context = { + # Translators: This message appears on the page title + 'title': _('Websites'), + } \ No newline at end of file