summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index a827fa902..73f140625 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2057,6 +2057,15 @@ class Dashboard(object):
return v
+EXPORT_FORMATS = []
+
+if settings.USE_LIBREOFFICE:
+ EXPORT_FORMATS.append(("xlsx", _("XLSX")))
+ EXPORT_FORMATS.append(("pdf", _("PDF")))
+
+EXPORT_FORMATS_DICT = dict(EXPORT_FORMATS)
+
+
class DocumentTemplate(models.Model):
name = models.CharField(_("Name"), max_length=100)
slug = models.SlugField(_("Slug"), max_length=100, unique=True)
@@ -2068,6 +2077,7 @@ class DocumentTemplate(models.Model):
null=True,
help_text=max_size_help(),
)
+ export_format = models.CharField(_("Export format"), max_length=4, choices=EXPORT_FORMATS, blank=True, default="")
label_template = models.FileField(
_("Base template for labels"),
upload_to="templates/%Y/",