-# 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 gettext_lazy as _
from django.contrib import admin
from modeltranslation.admin import TranslationAdmin
from fnpdjango.actions import export_as_csv_action
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):
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):
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',