X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ce02a06785b4ef96aa7aebc63641883a9ee491d4..111104c8e3e9487965eac9e916200a12d43bf2be:/src/newsletter/admin.py?ds=inline diff --git a/src/newsletter/admin.py b/src/newsletter/admin.py index bcb789761..21ab43403 100644 --- a/src/newsletter/admin.py +++ b/src/newsletter/admin.py @@ -15,7 +15,9 @@ class SubscriptionAdmin(admin.ModelAdmin): return my_urls + urls def extract_subscribers(self, request): - return HttpResponse(',\n'.join(Subscription.objects.values_list('email', flat=True)), content_type='text/plain') + active_subscriptions = Subscription.objects.filter(active=True) + return HttpResponse(',\n'.join(active_subscriptions.values_list('email', flat=True)), + content_type='text/plain') admin.site.register(Subscription, SubscriptionAdmin)