summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-04 22:44:58 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-04 22:44:58 +0100
commitcf38d1b8d0328b28b7dc48f7981907e66b9fdc8e (patch)
tree875fd13654455318eda8983abfbda53f554bc26e
parent73906807255262b09ba4539f959620dc8a405897 (diff)
downloadIshtar-cf38d1b8d0328b28b7dc48f7981907e66b9fdc8e.tar.bz2
Ishtar-cf38d1b8d0328b28b7dc48f7981907e66b9fdc8e.zip
Find table: force label for associated periods
-rw-r--r--archaeological_finds/models.py5
-rw-r--r--ishtar_common/widgets.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py
index fc231a16a..d142a22b3 100644
--- a/archaeological_finds/models.py
+++ b/archaeological_finds/models.py
@@ -307,10 +307,13 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
'base_finds__cache_short_id',
'base_finds__cache_complete_id',
'previous_id', 'label', 'material_types',
- 'datings__period', 'find_number', 'object_types',
+ 'datings__period__label', 'find_number', 'object_types',
'description',
'base_finds__context_record__parcel__town',
'base_finds__context_record__parcel', ]
+ TABLE_COLS_FOR_OPE_LBL = {
+ 'datings__period__label': _(u"Periods"),
+ }
EXTRA_FULL_FIELDS = [
'base_finds__cache_short_id', 'base_finds__cache_complete_id',
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index be22bd3cb..e21ce7a2a 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -322,7 +322,6 @@ class JQueryTown(forms.TextInput):
@classmethod
def encode_source(cls, source):
- encoded_src = ''
if isinstance(source, list):
encoded_src = JSONEncoder().encode(source)
elif isinstance(source, str) \