musician websites visualizacion

This commit is contained in:
Jorge Pastor 2024-04-23 17:14:39 +02:00
parent 60771b7808
commit bb4fc5e267
2 changed files with 11 additions and 1 deletions

View File

@ -44,4 +44,5 @@ urlpatterns = [
path('webappuser/<int:pk>/change-password/', views.WebappUserChangePasswordView.as_view(), name='webappuser-password'), path('webappuser/<int:pk>/change-password/', views.WebappUserChangePasswordView.as_view(), name='webappuser-password'),
path('systemusers/', views.SystemUserListView.as_view(), name='systemuser-list'), path('systemusers/', views.SystemUserListView.as_view(), name='systemuser-list'),
path('systemuser/<int:pk>/change-password/', views.SystemUserChangePasswordView.as_view(), name='systemuser-password'), path('systemuser/<int:pk>/change-password/', views.SystemUserChangePasswordView.as_view(), name='systemuser-password'),
path('websites/', views.WebsiteListView.as_view(), name='website-list'),
] ]

View File

@ -33,6 +33,7 @@ from orchestra.contrib.mailboxes.models import Address, Mailbox
from orchestra.contrib.resources.models import Resource, ResourceData from orchestra.contrib.resources.models import Resource, ResourceData
from orchestra.contrib.saas.models import SaaS from orchestra.contrib.saas.models import SaaS
from orchestra.contrib.systemusers.models import WebappUsers, SystemUser from orchestra.contrib.systemusers.models import WebappUsers, SystemUser
from orchestra.contrib.websites.models import Website
from orchestra.utils.html import html_to_pdf from orchestra.utils.html import html_to_pdf
from .auth import logout as auth_logout from .auth import logout as auth_logout
@ -649,4 +650,12 @@ class SystemUserChangePasswordView(CustomContextMixin, UserTokenRequiredMixin, U
success_url = reverse_lazy("musician:systemuser-list") success_url = reverse_lazy("musician:systemuser-list")
def get_queryset(self): def get_queryset(self):
return self.model.objects.filter(account=self.request.user) 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'),
}