X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/15058993d0b2158992a87002bf6e3297580428db..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)