diff --git a/orchestra/contrib/musician/templates/musician/website_detail.html b/orchestra/contrib/musician/templates/musician/website_detail.html
new file mode 100644
index 00000000..4092003d
--- /dev/null
+++ b/orchestra/contrib/musician/templates/musician/website_detail.html
@@ -0,0 +1,97 @@
+{% extends "musician/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% trans "Go back" %}
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/orchestra/contrib/musician/templates/musician/websiteoption_check_delete.html b/orchestra/contrib/musician/templates/musician/websiteoption_check_delete.html
new file mode 100644
index 00000000..c2eadfc5
--- /dev/null
+++ b/orchestra/contrib/musician/templates/musician/websiteoption_check_delete.html
@@ -0,0 +1,17 @@
+{% extends "musician/base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% endblock %}
diff --git a/orchestra/contrib/musician/urls.py b/orchestra/contrib/musician/urls.py
index b71daad4..69803735 100644
--- a/orchestra/contrib/musician/urls.py
+++ b/orchestra/contrib/musician/urls.py
@@ -44,7 +44,11 @@ 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'),
+ path('websites//', views.WebsiteDetailView.as_view(), name='website-detail'),
+ path('websites//content//delete/', views.WebsiteDeleteContentView.as_view(), name='website-delete-content'),
+ path('websites//directive//delete/', views.WebsiteDeleteDirectiveView.as_view(), name='website-delete-directive'),
path('webapps/', views.WebappListView.as_view(), name='webapp-list'),
path('webapps//', views.WebappDetailView.as_view(), name='webapp-detail'),
diff --git a/orchestra/contrib/musician/views.py b/orchestra/contrib/musician/views.py
index 7e65ca73..c1efd9a5 100644
--- a/orchestra/contrib/musician/views.py
+++ b/orchestra/contrib/musician/views.py
@@ -33,7 +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.contrib.websites.models import Website, Content, WebsiteDirective
from orchestra.contrib.webapps.models import WebApp, WebAppOption
from orchestra.utils.html import html_to_pdf
@@ -670,6 +670,62 @@ class WebsiteListView(CustomContextMixin, UserTokenRequiredMixin, ListView):
'description': _("A website is the place where a domain is associated with the directory where the web files are located. (WebApp)"),
})
return context
+
+
+class WebsiteDetailView(CustomContextMixin, UserTokenRequiredMixin, DetailView):
+ template_name = "musician/website_detail.html"
+ extra_context = {
+ # Translators: This message appears on the page title
+ 'title': _('website details'),
+ }
+
+ def get_queryset(self):
+ return Website.objects.filter(account=self.request.user)
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context['content'] = Content.objects.filter(website=self.object)
+ context['directives'] = WebsiteDirective.objects.filter(website=self.object)
+ return context
+
+
+class WebsiteDeleteContentView(CustomContextMixin, UserTokenRequiredMixin, DeleteView):
+ model = Content
+ template_name = "musician/websiteoption_check_delete.html"
+ pk_url_kwarg = "content_pk"
+
+ def get_queryset(self):
+ qs = Content.objects.filter(website__account=self.request.user, website=self.kwargs["pk"])
+ return qs
+
+ def get_success_url(self):
+ return reverse_lazy("musician:website-detail", kwargs={"pk": self.kwargs["pk"]})
+
+ def delete(self, request, *args, **kwargs):
+ object = self.get_object()
+ response = super().delete(request, *args, **kwargs)
+ object.website.save()
+ return response
+
+
+class WebsiteDeleteDirectiveView(CustomContextMixin, UserTokenRequiredMixin, DeleteView):
+ model = WebsiteDirective
+ template_name = "musician/websiteoption_check_delete.html"
+ pk_url_kwarg = "directive_pk"
+
+ def get_queryset(self):
+ qs = WebsiteDirective.objects.filter(website__account=self.request.user, website=self.kwargs["pk"])
+ return qs
+
+ def get_success_url(self):
+ return reverse_lazy("musician:website-detail", kwargs={"pk": self.kwargs["pk"]})
+
+ def delete(self, request, *args, **kwargs):
+ object = self.get_object()
+ response = super().delete(request, *args, **kwargs)
+ object.website.save()
+ return response
+
class WebappListView(CustomContextMixin, UserTokenRequiredMixin, ListView):
model = WebApp