From 920d6b15131521200ace711cbb78878eb378c744 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 19 Mar 2017 18:28:08 +0100 Subject: Containers: add an image (refs #3393) --- archaeological_warehouse/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archaeological_warehouse/models.py') diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 91184c907..d3671adf2 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012 Étienne Loks +# Copyright (C) 2012-2017 Étienne Loks # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -28,7 +28,7 @@ from django.utils.translation import ugettext_lazy as _, ugettext from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, get_external_id, \ - LightHistorizedItem, OwnPerms, Address, Person, post_save_cache + LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, ImageModel class WarehouseType(GeneralType): @@ -149,9 +149,10 @@ post_save.connect(post_save_cache, sender=ContainerType) post_delete.connect(post_save_cache, sender=ContainerType) -class Container(LightHistorizedItem): +class Container(LightHistorizedItem, ImageModel): TABLE_COLS = ['reference', 'container_type__label', 'cached_location', 'divisions_lbl'] + IMAGE_PREFIX = 'containers/' # search parameters EXTRA_REQUEST_KEYS = { -- cgit v1.2.3