From 9e8708f22e4f1265bb89c65496a0d4bae21a9cdc Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 10 Nov 2017 17:20:01 +0100 Subject: Models: generic images with m2m relations with main items --- archaeological_finds/models_treatments.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archaeological_finds/models_treatments.py') diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 03eeed452..6c173959a 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -30,7 +30,7 @@ from django.utils.translation import ugettext_lazy as _, ugettext from ishtar_common.utils import cached_label_changed, get_current_year from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \ OwnPerms, HistoricalRecords, Person, Organization, Source, \ - ValueGetter, post_save_cache, ShortMenuItem, DashboardFormItem + ValueGetter, post_save_cache, ShortMenuItem, DashboardFormItem, IshtarImage from archaeological_warehouse.models import Warehouse, Container from archaeological_finds.models_finds import Find, FindBasket, TreatmentType from archaeological_operations.models import ClosedItem, Operation @@ -115,6 +115,8 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, blank=True, null=True) target_is_basket = models.BooleanField(_(u"Target a basket"), default=False) + images = models.ManyToManyField(IshtarImage, verbose_name=_(u"Images"), + blank=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True, db_index=True) history = HistoricalRecords() -- cgit v1.2.3