summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-20 19:07:26 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-20 19:07:26 +0200
commit4e94cc1af7e816450940ba1a675c94bc10f1cd99 (patch)
treecacf5415cf4667c2384d13c312d339312fa4b194
parent80bc7eeb8da755c0c54471f6714a1ce33a89e3e2 (diff)
parentbc959913ada31882c49bbfe510933edc9f043444 (diff)
downloadIshtar-4e94cc1af7e816450940ba1a675c94bc10f1cd99.tar.bz2
Ishtar-4e94cc1af7e816450940ba1a675c94bc10f1cd99.zip
Merge branch 'master' into develop
-rw-r--r--CHANGES.md9
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html1
-rw-r--r--ishtar_common/models.py16
-rw-r--r--version.py4
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():