summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/migrations/0054_auto_20190225_1637.py36
-rw-r--r--archaeological_operations/models.py10
2 files changed, 41 insertions, 5 deletions
diff --git a/archaeological_operations/migrations/0054_auto_20190225_1637.py b/archaeological_operations/migrations/0054_auto_20190225_1637.py
new file mode 100644
index 000000000..724631757
--- /dev/null
+++ b/archaeological_operations/migrations/0054_auto_20190225_1637.py
@@ -0,0 +1,36 @@
+# -*- 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_operations', '0053_auto_20190218_1808'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='archaeologicalsite',
+ name='qrcode',
+ field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AddField(
+ model_name='historicalarchaeologicalsite',
+ name='qrcode',
+ field=models.TextField(blank=True, max_length=255, null=True),
+ ),
+ migrations.AddField(
+ model_name='historicaloperation',
+ name='qrcode',
+ field=models.TextField(blank=True, max_length=255, null=True),
+ ),
+ migrations.AddField(
+ model_name='operation',
+ name='qrcode',
+ field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ ]
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index d79bce7f3..a09798f1f 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -39,7 +39,7 @@ from ishtar_common.models import BaseHistorizedItem, Dashboard, \
post_delete_record_relation, post_save_cache, RelationItem, \
ShortMenuItem, SourceType, Town, ValueGetter, get_current_profile, \
document_attached_changed, HistoryModel, SearchAltName, \
- GeoItem
+ GeoItem, QRCodeItem
from ishtar_common.utils import cached_label_changed, \
force_cached_label_changed, mode, m2m_historization_changed, post_save_geo
@@ -107,8 +107,8 @@ post_save.connect(post_save_cache, sender=RecordQualityType)
post_delete.connect(post_save_cache, sender=RecordQualityType)
-class ArchaeologicalSite(BaseHistorizedItem, GeoItem, OwnPerms, ValueGetter,
- ShortMenuItem):
+class ArchaeologicalSite(BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms,
+ ValueGetter, ShortMenuItem):
SHOW_URL = 'show-site'
TABLE_COLS = ['reference', 'name', 'towns_label', 'periods', 'remains']
SLUG = 'site'
@@ -509,8 +509,8 @@ class OperationManager(models.GeoManager):
return self.get(code_patriarche=txt_idx)
-class Operation(ClosedItem, BaseHistorizedItem, GeoItem, OwnPerms, ValueGetter,
- ShortMenuItem, DashboardFormItem, RelationItem):
+class Operation(ClosedItem, BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms,\
+ ValueGetter, ShortMenuItem, DashboardFormItem, RelationItem):
SHOW_URL = 'show-operation'
TABLE_COLS = ['year', 'towns_label', 'common_name', 'operation_type',
'start_date', 'excavation_end_date', 'remains']