]> git.parisson.com Git - telemeta.git/commitdiff
epub: fix cover title
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jun 2015 07:32:52 +0000 (09:32 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jun 2015 07:32:52 +0000 (09:32 +0200)
telemeta/views/epub.py

index da8b0ca95375eb38c4597d30f50a90c1f24361bf..dde884ba429796ececb1c0084d6493566d5c5e03 100644 (file)
@@ -56,6 +56,7 @@ class BaseEpubMixin(TelemetaBaseMixin):
         site = Site.objects.get_current()
         self.chapters = []
         default_image_added = False
+        full_title = corpus.title + ' - ' + collection.title
 
         if not collection:
             self.filename = self.corpus.code
@@ -182,7 +183,7 @@ class BaseEpubMixin(TelemetaBaseMixin):
             self.book.spine.insert(0,'nav')
 
         # create spin, add cover page as first page
-        cover = epub.EpubHtml(title='cover-bis', file_name='cover-bis' + '.xhtml')
+        cover = epub.EpubHtml(title=full_title, file_name='cover-bis' + '.xhtml')
         cover.content = render_to_string(self.template_cover, {'image': cover_filename})
         self.book.add_item(cover)
         self.book.spine.insert(0, cover)