diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-25 18:07:15 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:57 +0200 |
commit | 0bd04e33c495c894a01298824482157837419cfe (patch) | |
tree | 068c7b4348f5fe28d4ab4ec50bbc1c3dbbf89271 /archaeological_context_records | |
parent | a3cfba27310530c4552eff14bd43b23f9d99c53a (diff) | |
download | Ishtar-0bd04e33c495c894a01298824482157837419cfe.tar.bz2 Ishtar-0bd04e33c495c894a01298824482157837419cfe.zip |
Manage generation of QR codes
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/migrations/0044_auto_20190225_1637.py | 26 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 4 |
2 files changed, 28 insertions, 2 deletions
diff --git a/archaeological_context_records/migrations/0044_auto_20190225_1637.py b/archaeological_context_records/migrations/0044_auto_20190225_1637.py new file mode 100644 index 000000000..5092fa2e7 --- /dev/null +++ b/archaeological_context_records/migrations/0044_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_context_records', '0043_auto_20190218_1808'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecord', + name='qrcode', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='qrcode', + field=models.TextField(blank=True, max_length=255, null=True), + ), + ] diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 004e292d9..cd2b5f382 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -35,7 +35,7 @@ from ishtar_common.models import Document, GeneralType, \ GeneralRelationType, GeneralRecordRelations, post_delete_record_relation,\ post_save_cache, ValueGetter, BulkUpdatedItem, ExternalIdManager, \ RelationItem, Town, get_current_profile, document_attached_changed, \ - HistoryModel, SearchAltName, GeoItem + HistoryModel, SearchAltName, GeoItem, QRCodeItem from archaeological_operations.models import Operation, Period, Parcel, \ ArchaeologicalSite @@ -269,7 +269,7 @@ class CRBulkView(object): """ -class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, GeoItem, +class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, QRCodeItem, GeoItem, OwnPerms, ValueGetter, ShortMenuItem, RelationItem): SHOW_URL = 'show-contextrecord' SLUG = 'contextrecord' |