From 456a193d104c27f441a7c824bbcde18544f99bda Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Tue, 3 Dec 2024 12:29:24 +0100 Subject: [PATCH] musician filter context domains --- .../musician/templates/musician/domain_list.html | 11 +++++++++++ orchestra/contrib/musician/views.py | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/orchestra/contrib/musician/templates/musician/domain_list.html b/orchestra/contrib/musician/templates/musician/domain_list.html index afc0c77b..979ce175 100644 --- a/orchestra/contrib/musician/templates/musician/domain_list.html +++ b/orchestra/contrib/musician/templates/musician/domain_list.html @@ -5,6 +5,17 @@

{% trans "Your domains" %}

+
+
+
+ + +
+ +
+
+
+ {% for domain in domains %}
diff --git a/orchestra/contrib/musician/views.py b/orchestra/contrib/musician/views.py index bf9af3dd..8a27ad1d 100644 --- a/orchestra/contrib/musician/views.py +++ b/orchestra/contrib/musician/views.py @@ -263,6 +263,10 @@ class DomainListView(CustomContextMixin, UserTokenRequiredMixin, TemplateView): context = super().get_context_data(**kwargs) domains = self.orchestra.retrieve_domain_list() + name = self.request.GET.get('name') + if name: + domains = domains.filter(name__icontains=name) + support_email = getattr(settings, "USER_SUPPORT_EMAIL", "suport@pangea.org") support_email_anchor = format_html( "{}",