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.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)