From 0dedc63c56d5230c48c9abadbdbba18a099a5fa1 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 27 Oct 2020 14:32:24 +0100 Subject: [PATCH 1/1] Fixes #4124: export cataloge books to csv. --- requirements/requirements.txt | 2 +- src/catalogue/admin.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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")]}), ( -- 2.20.1