X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f27fd052b9f3419cc4048711565db9984ca1a818..0bda5e48672b8e7b129272b9a23b8b80e8699c93:/apps/catalogue/models.py?ds=sidebyside
diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py
index 486172a2c..9640e7fd2 100644
--- a/apps/catalogue/models.py
+++ b/apps/catalogue/models.py
@@ -111,6 +111,8 @@ class Book(models.Model):
formats.append(u'Plik PDF' % self.pdf_file.url)
if self.odt_file:
formats.append(u'Plik ODT' % self.odt_file.url)
+ if self.txt_file:
+ formats.append(u'Plik TXT' % self.txt_file.url)
self._short_html = unicode(render_to_string('catalogue/book_short.html',
{'book': self, 'tags': tags, 'formats': formats}))
@@ -154,6 +156,7 @@ class Book(models.Model):
raise Book.AlreadyExists('Book %s already exists' % book_slug)
book.title = book_info.title
+ book._short_html = ''
book.save()
book_tags = []