From 5c00d4d985b9d0131bc7a829216e9b3e18d4ba48 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 7 May 2015 01:42:59 +0200 Subject: [PATCH] fix template --- .../telemeta-import-corpus-from-dir.py | 2 +- .../telemeta/inc/collection_epub.html | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 telemeta/templates/telemeta/inc/collection_epub.html diff --git a/telemeta/management/commands/telemeta-import-corpus-from-dir.py b/telemeta/management/commands/telemeta-import-corpus-from-dir.py index ee9cf108..60d06c29 100644 --- a/telemeta/management/commands/telemeta-import-corpus-from-dir.py +++ b/telemeta/management/commands/telemeta-import-corpus-from-dir.py @@ -50,7 +50,7 @@ class Command(BaseCommand): def handle(self, *args, **options): # NOT4PROD!! - reset() + # reset() root_dir = args[-1] cleanup_dir(root_dir) diff --git a/telemeta/templates/telemeta/inc/collection_epub.html b/telemeta/templates/telemeta/inc/collection_epub.html new file mode 100644 index 00000000..37020245 --- /dev/null +++ b/telemeta/templates/telemeta/inc/collection_epub.html @@ -0,0 +1,24 @@ + + +

{{ collection.title }}

+ +{% for item in items %} +
+

+ Son {{ item.old_code }} : {{ item.title }}. {{ item.comment }} ({{ item.track }}) +

+ +
+ +
+ + {% for image in item.related.all %} + {% if 'image' in image.mime_type %} +
+ +
+ {% endif %} + {% endfor %} + +
+{% endfor %} -- 2.39.5