From: Radek Czajka Date: Fri, 6 Oct 2023 12:13:43 +0000 (+0200) Subject: plwiki for books X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/e23ceedf469dc115c335f497c6c3e0834cda0ebc?ds=inline;hp=e0f595e44766e352edfce0aaf5d32be57f448882 plwiki for books --- diff --git a/src/catalogue/admin.py b/src/catalogue/admin.py index a035cc8e..7eafe7b3 100644 --- a/src/catalogue/admin.py +++ b/src/catalogue/admin.py @@ -420,6 +420,7 @@ class BookAdmin(WikidataAdminMixin, NumericFilterModelAdmin): "based_on", "original_year", "pd_year", + "plwiki", ] }, ), diff --git a/src/catalogue/migrations/0051_book_plwiki.py b/src/catalogue/migrations/0051_book_plwiki.py new file mode 100644 index 00000000..cc8a8299 --- /dev/null +++ b/src/catalogue/migrations/0051_book_plwiki.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.9 on 2023-10-06 14:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("catalogue", "0050_audience_woblink"), + ] + + operations = [ + migrations.AddField( + model_name="book", + name="plwiki", + field=models.CharField(blank=True, max_length=255), + ), + ] diff --git a/src/catalogue/models.py b/src/catalogue/models.py index 97680571..8db23ab3 100644 --- a/src/catalogue/models.py +++ b/src/catalogue/models.py @@ -279,6 +279,7 @@ class Book(WikidataModel): ) original_year = models.IntegerField(_('original publication year'), null=True, blank=True) pd_year = models.IntegerField(_('year of entry into PD'), null=True, blank=True) + plwiki = models.CharField(blank=True, max_length=255) gazeta_link = models.CharField(_("gazeta link"), max_length=255, blank=True) collections = models.ManyToManyField("Collection", blank=True, verbose_name=_("collections")) @@ -298,6 +299,7 @@ class Book(WikidataModel): verbose_name_plural = _('books') class Wikidata: + plwiki = "plwiki" authors = WIKIDATA.AUTHOR translators = WIKIDATA.TRANSLATOR title = WIKIDATA.TITLE