X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a18466c5b58ffbcca36e9834fd713b10265ead29..9d763695198b109f00b5d88a5cfe0190871271aa:/src/funding/admin.py?ds=sidebyside diff --git a/src/funding/admin.py b/src/funding/admin.py index 27109e696..6f29fbc83 100644 --- a/src/funding/admin.py +++ b/src/funding/admin.py @@ -1,7 +1,7 @@ # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.contrib import admin from modeltranslation.admin import TranslationAdmin from fnpdjango.actions import export_as_csv_action @@ -35,9 +35,9 @@ class PayedFilter(admin.SimpleListFilter): def queryset(self, request, queryset): if self.value() == 'yes': - return queryset.exclude(payed_at=None) + return queryset.exclude(completed_at=None) elif self.value() == 'no': - return queryset.filter(payed_at=None) + return queryset.filter(completed_at=None) class PerksFilter(admin.SimpleListFilter): @@ -59,12 +59,13 @@ class PerksFilter(admin.SimpleListFilter): class FundingAdmin(admin.ModelAdmin): model = Funding - list_display = ['payed_at', 'offer', 'amount', 'name', 'email', 'perk_names'] + list_display = ['created_at', 'completed_at', 'offer', 'amount', 'name', 'email', 'perk_names'] search_fields = ['name', 'email', 'offer__title', 'offer__author'] list_filter = [PayedFilter, 'offer', PerksFilter] + search_fields = ['user'] actions = [export_as_csv_action( fields=[ - 'id', 'offer', 'name', 'email', 'amount', 'payed_at', + 'id', 'offer', 'name', 'email', 'amount', 'completed_at', 'notifications', 'notify_key', 'wl_optout_url' ] )]