diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-05-01 20:09:21 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:43:58 +0200 |
| commit | eac44d3169c682e183d962f99d21a1e44354d37b (patch) | |
| tree | 063f1adeb5f768028edbf2c0de1cb30f17de2f8e /archaeological_context_records/models.py | |
| parent | f8eca001008f0e07c6a2a38e78c1af5db415940a (diff) | |
| download | Ishtar-eac44d3169c682e183d962f99d21a1e44354d37b.tar.bz2 Ishtar-eac44d3169c682e183d962f99d21a1e44354d37b.zip | |
Display generation button for relation image on the sheet
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index a3dcd5761..f6253bf68 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -33,7 +33,8 @@ from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, ShortMenuItem, Source, GeneralRelationType,\ GeneralRecordRelations, post_delete_record_relation, get_image_path, \ - ImageModel, post_save_cache, ValueGetter, BulkUpdatedItem, IshtarImage + ImageModel, post_save_cache, ValueGetter, BulkUpdatedItem, IshtarImage, \ + RelationItem from archaeological_operations.models import Operation, Period, Parcel, \ ArchaeologicalSite @@ -205,7 +206,8 @@ class CRBulkView(object): class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, - ImageModel, OwnPerms, ValueGetter, ShortMenuItem): + ImageModel, OwnPerms, ValueGetter, ShortMenuItem, + RelationItem): SHOW_URL = 'show-contextrecord' SLUG = 'contextrecord' EXTERNAL_ID_KEY = 'context_record_external_id' @@ -326,10 +328,6 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, blank=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True, db_index=True) - relation_image = models.FileField( - _(u"Generated relation image (SVG)"), null=True, blank=True, - upload_to=get_image_path - ) PARENT_SEARCH_VECTORS = ['operation'] BASE_SEARCH_VECTORS = ["cached_label", "label", "location", "interpretation", "filling", "datings_comment", |
