X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/69b332800a472211b5da70426171fa429702a273..37f3ee92951cdf0d9742b37a5a5f839675b996ff:/src/catalogue/admin.py?ds=sidebyside diff --git a/src/catalogue/admin.py b/src/catalogue/admin.py index af083691..7eafe7b3 100644 --- a/src/catalogue/admin.py +++ b/src/catalogue/admin.py @@ -15,6 +15,7 @@ from fnpdjango.actions import export_as_csv_action from modeltranslation.admin import TabbedTranslationAdmin from . import models import documents.models +import sources.models from .wikidata import WikidataAdminMixin @@ -301,7 +302,13 @@ class FirstPublicationYearFilter(admin.ListFilter): ] +class SourcesInline(admin.TabularInline): + model = sources.models.BookSource + extra = 1 + + class BookAdmin(WikidataAdminMixin, NumericFilterModelAdmin): + inlines = [SourcesInline] list_display = [ "smart_title", "authors_str", @@ -413,6 +420,7 @@ class BookAdmin(WikidataAdminMixin, NumericFilterModelAdmin): "based_on", "original_year", "pd_year", + "plwiki", ] }, ),