From: Radek Czajka Date: Tue, 27 Oct 2020 13:32:24 +0000 (+0100) Subject: Fixes #4124: export cataloge books to csv. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/0dedc63c56d5230c48c9abadbdbba18a099a5fa1 Fixes #4124: export cataloge books to csv. --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 313d092d..6f5cf03a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -14,7 +14,7 @@ librarian==1.8.1 ## Django Django==3.0.4 -fnpdjango==0.4.3 +fnpdjango==0.4.5 django-pipeline==1.7.0 # + django-cas-ng==4.1.1 # + sorl-thumbnail==12.6.3 # + diff --git a/src/catalogue/admin.py b/src/catalogue/admin.py index 608d625d..90759b0f 100644 --- a/src/catalogue/admin.py +++ b/src/catalogue/admin.py @@ -3,6 +3,7 @@ # from django.contrib import admin from django.utils.translation import gettext_lazy as _ +from fnpdjango.actions import export_as_csv_action from . import models from .wikidata import WikidataAdminMixin @@ -43,6 +44,7 @@ class BookAdmin(WikidataAdminMixin, admin.ModelAdmin): prepopulated_fields = {"slug": ("title",)} list_filter = ["language", "pd_year", "collections"] readonly_fields = ["wikidata_link"] + actions = [export_as_csv_action()] fieldsets = [ (None, {"fields": [("wikidata", "wikidata_link")]}), (