diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-28 19:20:33 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-28 19:20:33 +0200 |
commit | 93052a1caeeea3ca08362e7152b4f5c8c3fb0280 (patch) | |
tree | a00e1e40596cd89bf1a488c8332a55af3a593d96 /archaeological_operations/models.py | |
parent | 446eab605172aa778569914e7c43232c013d0d1a (diff) | |
download | Ishtar-93052a1caeeea3ca08362e7152b4f5c8c3fb0280.tar.bz2 Ishtar-93052a1caeeea3ca08362e7152b4f5c8c3fb0280.zip |
Change all upload directories
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 5 |
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: |