X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/17d853e607e5db956defac483a76459eb654811c..2bde30d633af49f2d3d40305e30df68c04dc0786:/src/wlxml/views.py?ds=sidebyside diff --git a/src/wlxml/views.py b/src/wlxml/views.py index edf8a920..3375b0d9 100644 --- a/src/wlxml/views.py +++ b/src/wlxml/views.py @@ -7,8 +7,8 @@ from librarian.dcparser import BookInfo from librarian.document import WLDocument from librarian.builders import StandaloneHtmlBuilder from librarian.meta.types.wluri import WLURI -from librarian.meta.types.text import LegimiCategory, Epoch, Kind, Genre, Audience -from depot.legimi import legimi +from librarian.meta.types.text import LegimiCategory, Epoch, Kind, Genre, Audience, ThemaCategory, MainThemaCategory +from depot.publishers.legimi import Legimi class XslView(TemplateView): @@ -48,7 +48,28 @@ class TagView(DetailView): VALUE_TYPES = { LegimiCategory: { 'widget': 'select', - 'options': [''] + list(legimi.CATEGORIES.keys()), + 'options': [''] + list(Legimi.CATEGORIES.keys()), + }, + Audience: { + 'autocomplete': { + 'source': '/catalogue/terms/audience/', + } + }, + ThemaCategory: { + 'autocomplete': { + 'source': '/catalogue/terms/thema/', + }, + 'chooser': { + 'source': '/catalogue/chooser/thema/', + }, + }, + MainThemaCategory: { + 'autocomplete': { + 'source': '/catalogue/terms/thema-main/', + }, + 'chooser': { + 'source': '/catalogue/chooser/thema-main/', + }, }, Epoch: { 'autocomplete': { @@ -114,7 +135,7 @@ VALUE_TYPES = { }, "publisher": { "autocomplete": { - "source": ["Fundacja Nowoczesna Polska"] + "source": ["Fundacja Wolne Lektury"] } },