X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/022b1747124fb6b6314c4eccf98d5bf89dff5d25..66f7c2655c3bbc544569b6b5111b50b14cb9336b:/src/catalogue/models.py diff --git a/src/catalogue/models.py b/src/catalogue/models.py index 4568af10..d0698808 100644 --- a/src/catalogue/models.py +++ b/src/catalogue/models.py @@ -4,6 +4,7 @@ from django.apps import apps from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ +from admin_ordering.models import OrderableModel from wikidata.client import Client from .constants import WIKIDATA from .wikidata import WikidataMixin @@ -39,8 +40,6 @@ class Author(WikidataMixin, models.Model): culturepl_link = models.CharField(_("culture.pl link"), max_length=255, blank=True) description = models.TextField(_("description"), blank=True) - description_de = models.TextField(_("description (de)"), blank=True) - description_lt = models.TextField(_("description (lt)"), blank=True) priority = models.PositiveSmallIntegerField( _("priority"), @@ -83,6 +82,11 @@ class Author(WikidataMixin, models.Model): return None +class NotableBook(OrderableModel): + author = models.ForeignKey(Author, models.CASCADE) + book = models.ForeignKey('Book', models.CASCADE) + + class Category(WikidataMixin, models.Model): name = models.CharField(_("name"), max_length=255) slug = models.SlugField(max_length=255, unique=True)