summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-11-10 05:58:11 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2020-11-10 05:58:11 +0100
commitb4737911c00fee3b3c274d10842d132c4a5f823a (patch)
tree54a3bb344e5c39987f6b18267db7ecaa4505c115
parent38feb7f2d40dfd1e05b81314b15c52ccb95fc870 (diff)
downloadIshtar-b4737911c00fee3b3c274d10842d132c4a5f823a.tar.bz2
Ishtar-b4737911c00fee3b3c274d10842d132c4a5f823a.zip
Imports: add "|" separator for CSV
-rw-r--r--ishtar_common/models_imports.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py
index 42ab7f9ea..e23e7cd56 100644
--- a/ishtar_common/models_imports.py
+++ b/ishtar_common/models_imports.py
@@ -894,7 +894,8 @@ ENCODINGS = [(settings.ENCODING, settings.ENCODING),
('utf-8', 'utf-8')]
CSV_SEPS = ((",", ","),
- (";", ";"),)
+ (";", ";"),
+ ("|", "|"))
@task()
@@ -935,7 +936,7 @@ class Import(models.Model):
encoding = models.CharField(_("Encoding"), choices=ENCODINGS,
default=u'utf-8', max_length=15)
csv_sep = models.CharField(
- _("CSV separator"), choices=CSV_SEPS, default=u',', max_length=1,
+ _("CSV separator"), choices=CSV_SEPS, default=',', max_length=1,
help_text=_("Separator for CSV file. Standard is comma but Microsoft "
"Excel do not follow this standard and use semi-colon.")
)