]> git.parisson.com Git - telemeta.git/commitdiff
fix again
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 May 2015 15:36:50 +0000 (17:36 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 May 2015 15:36:50 +0000 (17:36 +0200)
telemeta/views/epub.py

index 93d81f96ae6ca840cc7c139125f8ec137596ddeb..8215256c8c91e041b7682de0bda2b83289feb84f 100644 (file)
@@ -90,7 +90,7 @@ class BaseEpubMixin(TelemetaBaseMixin):
             self.book.set_cover(filename, open(media.file.path, 'r').read())
             break
 
-        context = {'mode_single': mode_single}
+        context = {}
         preamble = epub.EpubHtml(title='Preamble', file_name='preamble' + '.xhtml', lang='fr')
         preamble.content = render_to_string(self.template_preamble, context)
         preamble.is_chapter = False
@@ -147,7 +147,7 @@ class BaseEpubMixin(TelemetaBaseMixin):
                 title = collection.title
                 subtitle = ''
 
-            context = {'collection': collection, 'title': title, 'subtitle': subtitle,
+            context = {'collection': collection, 'title': title, 'subtitle': subtitle, 'mode_single': mode_single,
                         'site': site, 'items': items, 'default_image': default_image_relative_path}
             c = epub.EpubHtml(title=' - '.join([title, subtitle]), file_name=collection.code + '.xhtml', lang='fr')
             c.content = render_to_string(self.template, context)