summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 5a90ccac5..1f4108c28 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -179,7 +179,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
SHOW_URL = 'show-operation'
TABLE_COLS = ['year', 'towns', 'common_name', 'operation_type',
'start_date', 'excavation_end_date', 'remains']
- IMAGE_PREFIX = 'operations/'
SLUG = 'operation'
# search parameters
@@ -479,6 +478,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
self.context_record.model.cached_label_bulk_update(operation_id=self.pk)
return True
+ def _get_base_image_path(self):
+ return u"operation/{}/{}".format(
+ self.year, self.reference)
+
def get_town_label(self):
lbl = unicode(_('Intercommunal'))
if self.towns.count() == 1: