summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 18:30:24 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 18:31:52 +0200
commitf751e22887e8940d0e3ed3c81eee0fb92e8d7820 (patch)
tree54a97773eef1b633895480a8b8caeb768bf7b43a /archaeological_operations/models.py
parent10c8a694f2ffcfc001f5deddcb7d633d9f00b7cc (diff)
downloadIshtar-f751e22887e8940d0e3ed3c81eee0fb92e8d7820.tar.bz2
Ishtar-f751e22887e8940d0e3ed3c81eee0fb92e8d7820.zip
Add images for operation, context records and sources (refs #2927, refs #351)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index ccafe5202..a855c3bda 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -36,7 +36,7 @@ from ishtar_common.models import GeneralType, BaseHistorizedItem, \
SourceType, Person, Organization, Town, Dashboard, IshtarUser, ValueGetter,\
DocumentTemplate, ShortMenuItem, DashboardFormItem, GeneralRelationType,\
GeneralRecordRelations, post_delete_record_relation, OperationType, \
- get_external_id
+ get_external_id, ImageModel
class RemainType(GeneralType):
@@ -166,13 +166,14 @@ class ClosedItem(object):
return {'date': date, 'user': user}
-class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
- ShortMenuItem, DashboardFormItem):
+class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
+ ValueGetter, ShortMenuItem, DashboardFormItem):
QUALITY_DICT = dict(QUALITY)
SHOW_URL = 'show-operation'
TABLE_COLS = ['year_index', 'operation_type', 'remains', 'towns',
'start_date', 'excavation_end_date']
TABLE_COLS.insert(4, 'associated_file_short_label')
+ IMAGE_PREFIX = 'operations/'
creation_date = models.DateField(_(u"Creation date"),
default=datetime.date.today)
end_date = models.DateField(_(u"Closing date"), null=True, blank=True)