X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2f331ef41f1d5db23305ec79a02dfbff342ce893..dee22de65cab11aa05b68313e22e0201308de826:/src/funding/admin.py diff --git a/src/funding/admin.py b/src/funding/admin.py index 47bc98a02..7402c2a95 100644 --- a/src/funding/admin.py +++ b/src/funding/admin.py @@ -1,7 +1,6 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # -from django.utils.translation import ugettext_lazy as _ from django.contrib import admin from modeltranslation.admin import TranslationAdmin from fnpdjango.actions import export_as_csv_action @@ -24,13 +23,13 @@ class PerkAdmin(TranslationAdmin): class PayedFilter(admin.SimpleListFilter): - title = _('payment complete') + title = 'płatność doszła do skutku' parameter_name = 'payed' def lookups(self, request, model_admin): return ( - ('yes', _('Yes')), - ('no', _('No')), + ('yes', 'Tak'), + ('no', 'Nie'), ) def queryset(self, request, queryset): @@ -41,13 +40,13 @@ class PayedFilter(admin.SimpleListFilter): class PerksFilter(admin.SimpleListFilter): - title = _('perks') + title = 'prezenty' parameter_name = 'perks' def lookups(self, request, model_admin): return ( - ('yes', _('Yes')), - ('no', _('No')), + ('yes', 'Tak'), + ('no', 'Nie'), ) def queryset(self, request, queryset): @@ -62,7 +61,6 @@ class FundingAdmin(admin.ModelAdmin): 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', 'completed_at', @@ -75,6 +73,7 @@ class SpentAdmin(admin.ModelAdmin): model = Spent list_display = ['book', 'amount', 'timestamp'] search_fields = ['book__title'] + autocomplete_fields = ['book'] admin.site.register(Offer, OfferAdmin)