diff options
-rw-r--r-- | CHANGES.md | 9 | ||||
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 1 | ||||
-rw-r--r-- | ishtar_common/models.py | 16 | ||||
-rw-r--r-- | version.py | 4 |
4 files changed, 20 insertions, 10 deletions
diff --git a/CHANGES.md b/CHANGES.md index 7619cc407..198be8ce3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,15 @@ Ishtar changelog ================ +v0.99.25 (2017-07-20) +--------------------- +### Features ### +- Context record sheet: add documentation field + +### Bug fixes ### +- Imports: fix skip of lines when import file is not utf-8 +- Fix display view + v0.99.24 (2017-07-12) --------------------- ### Features ### diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 72e79dadc..fb5106faf 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -23,6 +23,7 @@ {% field_li "Excavation technic" item.excavation_technic %} {% field_li_multiple "Chronology" item.datings %} {% field_li "Town" item.parcel.town %} + {% field_li_multiple "Documentation" item.documentations %} </ul> {% field "Comment on datings" item.datings_comment "<pre>" "</pre>" %} diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 6082fb4e0..01b46b7ae 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2532,20 +2532,20 @@ class Import(models.Model): tmpdir = tempfile.mkdtemp(prefix='tmp-ishtar-') imported_file = z.extract(filename, tmpdir) - with open(imported_file) as csv_file: - encodings = [self.encoding] - encodings += [coding for coding, c in ENCODINGS] - for encoding in encodings: - try: + encodings = [self.encoding] + encodings += [coding for coding, c in ENCODINGS + if coding != self.encoding] + for encoding in encodings: + try: + with open(imported_file) as csv_file: vals = [line for line in unicodecsv.reader(csv_file, encoding=encoding)] if tmpdir: shutil.rmtree(tmpdir) return vals - except UnicodeDecodeError: - if encoding != encodings[-1]: - csv_file.seek(0) + except UnicodeDecodeError: + pass # try the next encoding if tmpdir: shutil.rmtree(tmpdir) return [] diff --git a/version.py b/version.py index ec164ee24..8b516aa40 100644 --- a/version.py +++ b/version.py @@ -1,5 +1,5 @@ -# 1.99.4 -VERSION = (1, 99, 4) +# 1.99.5 +VERSION = (1, 99, 5) def get_version(): |