X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e883fa899b3df6e047f9e821a7ca81f53a02ddba..51d450b5b3346e2b2418702c90449a0a87daaba9:/apps/catalogue/models.py 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: