summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r--archaeological_warehouse/models.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index 40de49d60..30c117fc2 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -27,11 +27,10 @@ from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from ishtar_common.data_importer import post_importer_action
-from ishtar_common.utils import cached_label_changed
-
-from ishtar_common.models import GeneralType, get_external_id, \
+from ishtar_common.models import Document, GeneralType, get_external_id, \
LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, \
ImageModel, DashboardFormItem, IshtarImage, ThroughImage
+from ishtar_common.utils import cached_label_changed
class WarehouseType(GeneralType):
@@ -63,6 +62,9 @@ class Warehouse(Address, DashboardFormItem, OwnPerms):
'WarehouseDivision', verbose_name=_("Divisions"), blank=True,
through='WarehouseDivisionLink'
)
+ documents = models.ManyToManyField(
+ Document, related_name='warehouses', verbose_name=_(u"Documents"),
+ blank=True)
images = models.ManyToManyField(IshtarImage, verbose_name=_(u"Images"),
through='WarehouseImage', blank=True)
external_id = models.TextField(_(u"External ID"), blank=True, null=True)