From b4737911c00fee3b3c274d10842d132c4a5f823a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 10 Nov 2020 05:58:11 +0100 Subject: Imports: add "|" separator for CSV --- ishtar_common/models_imports.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models_imports.py') 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.") ) -- cgit v1.2.3