X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e883fa899b3df6e047f9e821a7ca81f53a02ddba..8b96e2697a791ce6af5f6b6f38477c0a81dac124:/apps/catalogue/models.py?ds=sidebyside diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index f283ccedc..3704b1663 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -482,6 +482,7 @@ class Book(models.Model): def build_html(self): from django.core.files.base import ContentFile from slughifi import slughifi + from sortify import sortify from librarian import html meta_tags = list(self.tags.filter( @@ -516,7 +517,7 @@ class Book(models.Model): tag, created = Tag.objects.get_or_create(slug=slughifi(theme_name), category='theme') if created: tag.name = theme_name - tag.sort_key = theme_name.lower() + tag.sort_key = sortify(theme_name.lower()) tag.save() themes.append(tag) if not themes: