summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/migrations/0112_document_qrcode.py21
-rw-r--r--ishtar_common/models.py5
2 files changed, 25 insertions, 1 deletions
diff --git a/ishtar_common/migrations/0112_document_qrcode.py b/ishtar_common/migrations/0112_document_qrcode.py
new file mode 100644
index 000000000..6e456dc52
--- /dev/null
+++ b/ishtar_common/migrations/0112_document_qrcode.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.18 on 2019-09-18 13:09
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('ishtar_common', '0111_ishtarsiteprofile_account_naming_style'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='document',
+ name='qrcode',
+ field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ ]
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 6f51a840e..d8283e23f 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -4945,7 +4945,10 @@ post_save.connect(post_save_cache, sender=LicenseType)
post_delete.connect(post_save_cache, sender=LicenseType)
-class Document(BaseHistorizedItem, OwnPerms, ImageModel, ValueGetter, MainItem):
+class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel,
+ ValueGetter, MainItem):
+ APP = "ishtar-common"
+ MODEL = "document"
EXTERNAL_ID_KEY = 'document_external_id'
DELETE_URL = 'delete-document'
# order is important: put the image in the first match found