From e93ae57d3c88662a6f9ec83cfad90fb17ea4a98e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 Aug 2017 19:20:33 +0200 Subject: Change all upload directories --- archaeological_operations/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archaeological_operations') 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: -- cgit v1.2.3