X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e0f595e44766e352edfce0aaf5d32be57f448882..2890d9e9df234b3e13fb0581337bc2d678ffdcb0:/src/catalogue/models.py diff --git a/src/catalogue/models.py b/src/catalogue/models.py index 97680571..e2d737a2 100644 --- a/src/catalogue/models.py +++ b/src/catalogue/models.py @@ -198,6 +198,9 @@ class NotableBook(OrderableModel): author = models.ForeignKey(Author, models.CASCADE) book = models.ForeignKey('Book', models.CASCADE) + def __str__(self): + return self.book.title + class Category(WikidataModel): name = models.CharField(_("name"), max_length=255) @@ -279,6 +282,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 +302,7 @@ class Book(WikidataModel): verbose_name_plural = _('books') class Wikidata: + plwiki = "plwiki" authors = WIKIDATA.AUTHOR translators = WIKIDATA.TRANSLATOR title = WIKIDATA.TITLE