-# 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):
model = Spent
list_display = ['book', 'amount', 'timestamp']
search_fields = ['book__title']
+ autocomplete_fields = ['book']
admin.site.register(Offer, OfferAdmin)