summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:14:01 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:14:01 +0200
commit8c33886e7f24deb1623e82e0792af9923899f7ad (patch)
tree101144fad0e35a101edac31910ccea67c88a3963 /archaeological_context_records/models.py
parent2ff9087dd0a1c93be556a1267519ce1c9accc732 (diff)
parent7f8be42cf5cea041bede638d355a8de0d0f97dbf (diff)
downloadIshtar-8c33886e7f24deb1623e82e0792af9923899f7ad.tar.bz2
Ishtar-8c33886e7f24deb1623e82e0792af9923899f7ad.zip
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index f2a802fbe..34204ebfa 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -26,7 +26,8 @@ from django.utils.translation import ugettext_lazy as _, ugettext, pgettext
from ishtar_common.models import GeneralType, BaseHistorizedItem, \
HistoricalRecords, OwnPerms, ShortMenuItem, Source, GeneralRelationType,\
- GeneralRecordRelations, post_delete_record_relation, get_external_id
+ GeneralRecordRelations, post_delete_record_relation, get_external_id, \
+ ImageModel
from archaeological_operations.models import Operation, Period, Parcel
@@ -105,7 +106,7 @@ class IdentificationType(GeneralType):
return self.label
-class ContextRecord(BaseHistorizedItem, OwnPerms, ShortMenuItem):
+class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
SHOW_URL = 'show-contextrecord'
TABLE_COLS = ['parcel.town', 'operation.year',
'operation.operation_code',
@@ -120,6 +121,7 @@ class ContextRecord(BaseHistorizedItem, OwnPerms, ShortMenuItem):
'related_context_records': 'detailled_related_context_records'
}
}
+ IMAGE_PREFIX = 'context_records/'
external_id = models.TextField(_(u"External ID"), blank=True, null=True)
auto_external_id = models.BooleanField(
_(u"External ID is set automatically"), default=False)