diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-11-04 16:00:20 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-11-04 16:00:20 +0100 |
commit | 72b0e6ca45a7296f6288bf994ff3da86c85bad32 (patch) | |
tree | e2b9ea825e5ef20a81bef7d58688cd4fe798eeca /ishtar_common | |
parent | a8400088480d5389345c0aa5ff691704f9764513 (diff) | |
download | Ishtar-72b0e6ca45a7296f6288bf994ff3da86c85bad32.tar.bz2 Ishtar-72b0e6ca45a7296f6288bf994ff3da86c85bad32.zip |
Labels generation: fix missing images in templates
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 2 | ||||
-rw-r--r-- | ishtar_common/templates/blocks/DataTables-content.html | 2 | ||||
-rw-r--r-- | ishtar_common/utils_secretary.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 0e68bf7dd..94d8744e5 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3665,7 +3665,7 @@ class DocumentTemplate(models.Model): break obj = objects[c_idx] values["items"].append(obj.get_values()) - engine = SecretaryRenderer() + engine = IshtarSecretaryRenderer() try: result = engine.render(self.template, **values) except TemplateSyntaxError as e: diff --git a/ishtar_common/templates/blocks/DataTables-content.html b/ishtar_common/templates/blocks/DataTables-content.html index 82da411e1..814e10c18 100644 --- a/ishtar_common/templates/blocks/DataTables-content.html +++ b/ishtar_common/templates/blocks/DataTables-content.html @@ -44,7 +44,7 @@ <button id="export-labels-{{name}}" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - {% trans 'Labels'%} + {% trans 'Labels' context 'To be print' %} </button> <div class="dropdown-menu" aria-labelledby="export-labels-{{name}}"> {% for template in current_model.label_templates %} diff --git a/ishtar_common/utils_secretary.py b/ishtar_common/utils_secretary.py index 972b7d223..f1266b856 100644 --- a/ishtar_common/utils_secretary.py +++ b/ishtar_common/utils_secretary.py @@ -49,7 +49,7 @@ class IshtarSecretaryRenderer(Renderer): def ishtar_media_loader(self, media, *args, **kwargs): res = self.fs_loader(media, *args, **kwargs) - if not res: + if not res or not res[0]: return image_file, mime = res if "width" in kwargs: |