diff options
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 |
commit | 7fb1ff25e2491e94c3446a401e644de9793006f5 (patch) | |
tree | 54a97773eef1b633895480a8b8caeb768bf7b43a /archaeological_operations/models.py | |
parent | d3d84ed7cc5ff3cb9c164838c78cfcee73fbc44e (diff) | |
download | Ishtar-7fb1ff25e2491e94c3446a401e644de9793006f5.tar.bz2 Ishtar-7fb1ff25e2491e94c3446a401e644de9793006f5.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.py | 7 |
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) |