from django.contrib import admin
from django.contrib import messages
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from fnpdjango.actions import export_as_csv_action
from . import models
class EmailTemplateAdmin(admin.ModelAdmin):
- list_display = ['state', 'min_days_since', 'subject', 'min_hour']
+ list_display = ['state', 'min_days_since', 'subject', 'min_hour', 'is_active']
fieldsets = [
(None, {"fields": [
'state',
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'])]
+ actions = [
+# export_as_csv_action(fields=['id', 'email', 'get_level_display', 'since', 'expires_at']),
+ export_as_csv_action('Eksport dla PHPList', fields=['email', 'wl_optout_url'])
+ ]
admin.site.register(models.Contact, ContactAdmin)