diff options
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/migrations/0035_auto_20190225_1637.py | 26 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 7 |
2 files changed, 30 insertions, 3 deletions
diff --git a/archaeological_warehouse/migrations/0035_auto_20190225_1637.py b/archaeological_warehouse/migrations/0035_auto_20190225_1637.py new file mode 100644 index 000000000..4f892a3a7 --- /dev/null +++ b/archaeological_warehouse/migrations/0035_auto_20190225_1637.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2019-02-25 16:37 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0034_auto_20190218_1808'), + ] + + operations = [ + migrations.AddField( + model_name='container', + name='qrcode', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AddField( + model_name='warehouse', + name='qrcode', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 795c879e4..115f0d7ea 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -31,7 +31,8 @@ from ishtar_common.data_importer import post_importer_action from ishtar_common.models import Document, GeneralType, get_external_id, \ LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, \ DashboardFormItem, ExternalIdManager, ShortMenuItem, \ - document_attached_changed, SearchAltName, DynamicRequest, GeoItem + document_attached_changed, SearchAltName, DynamicRequest, GeoItem, \ + QRCodeItem from ishtar_common.utils import cached_label_changed, post_save_geo @@ -46,7 +47,7 @@ post_save.connect(post_save_cache, sender=WarehouseType) post_delete.connect(post_save_cache, sender=WarehouseType) -class Warehouse(Address, GeoItem, DashboardFormItem, OwnPerms, +class Warehouse(Address, GeoItem, QRCodeItem, DashboardFormItem, OwnPerms, ShortMenuItem): SLUG = 'warehouse' SHOW_URL = 'show-warehouse' @@ -322,7 +323,7 @@ post_save.connect(post_save_cache, sender=ContainerType) post_delete.connect(post_save_cache, sender=ContainerType) -class Container(LightHistorizedItem, GeoItem, OwnPerms): +class Container(LightHistorizedItem, QRCodeItem, GeoItem, OwnPerms): SLUG = 'container' SHOW_URL = 'show-container' TABLE_COLS = ['reference', 'container_type__label', 'cached_location', |