+ Voir les événements {% picto_from_name "calendar" %}
Exécuter {% picto_from_name "download-cloud" %}
Éditer {% picto_from_name "edit" %}
Supprimer {% picto_from_name "trash" %}
diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py
index 2d8aa5a..11ce8ee 100644
--- a/src/agenda_culturel/views.py
+++ b/src/agenda_culturel/views.py
@@ -875,6 +875,16 @@ class EventFilterAdmin(django_filters.FilterSet):
choices=Event.STATUS.choices, widget=forms.CheckboxSelectMultiple
)
+ import_sources = django_filters.ModelChoiceFilter(
+ label="Importé depuis",
+ method="filter_by_source",
+ queryset=RecurrentImport.objects.all().order_by("name__unaccent")
+ )
+
+ def filter_by_source(self, queryset, name, value):
+ src = RecurrentImport.objects.get(pk=value.pk).source
+ return queryset.filter(import_sources__contains=[src])
+
class Meta:
model = Event
fields = ["status"]