X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4af7ac8eb45833fc3251d799ef48cd834183901e..3c6061e46736c8673316f609ad5b5cb86dcd7096:/src/messaging/admin.py?ds=sidebyside diff --git a/src/messaging/admin.py b/src/messaging/admin.py index 4ea538f62..6749106d6 100644 --- a/src/messaging/admin.py +++ b/src/messaging/admin.py @@ -1,6 +1,7 @@ from django.contrib import admin from django.contrib import messages from django.utils.translation import ugettext_lazy as _ +from fnpdjango.actions import export_as_csv_action from . import models @@ -83,6 +84,7 @@ class ContactAdmin(admin.ModelAdmin): list_display = ['email', 'level', 'since', 'expires_at'] search_fields = ['email'] date_hierarchy = 'since' + actions = [export_as_csv_action(fields=['id', 'email', 'get_level_display', 'since', 'expires_at'])] admin.site.register(models.Contact, ContactAdmin)