X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ec3ed54f52c0551fab881e2fa6009cdd6469559f..40a66c8feb465a5d40035272bfd2b95e9027b7dd:/apps/catalogue/models.py?ds=inline diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index d8565c4bc..05009a5bc 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -137,7 +137,8 @@ class Book(models.Model): # Read book metadata book_info = dcparser.parse(xml_file) - book = Book(title=book_info.title, slug=slughifi(book_info.title)) + book_base, book_slug = book_info.url.rsplit('/', 1) + book = Book(title=book_info.title, slug=book_slug) book.save() book_tags = []