diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-01-22 11:24:52 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-03-10 11:11:46 +0100 |
| commit | 5311aea5f9b9bd0fbfb12e368560ddd5d150162b (patch) | |
| tree | 4a4050af45b81a1de8b1a32b3f34016bf3499bb2 /ishtar_common | |
| parent | ec65aff80a94fce6f74c4f89673abc579cc53310 (diff) | |
| download | Ishtar-5311aea5f9b9bd0fbfb12e368560ddd5d150162b.tar.bz2 Ishtar-5311aea5f9b9bd0fbfb12e368560ddd5d150162b.zip | |
🚧 Statement condition: models
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/migrations/0272_ishtarsiteprofile_statementcondition.py | 42 | ||||
| -rw-r--r-- | ishtar_common/models.py | 19 |
2 files changed, 61 insertions, 0 deletions
diff --git a/ishtar_common/migrations/0272_ishtarsiteprofile_statementcondition.py b/ishtar_common/migrations/0272_ishtarsiteprofile_statementcondition.py new file mode 100644 index 000000000..0f26cb382 --- /dev/null +++ b/ishtar_common/migrations/0272_ishtarsiteprofile_statementcondition.py @@ -0,0 +1,42 @@ +# Generated by Django 4.2.19 on 2026-01-20 10:15 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0271_importerduplicatefield_concat_str'), + ] + + operations = [ + migrations.AlterModelOptions( + name='import', + options={'permissions': (('view_own_import', 'Can view own Import'), ('add_own_import', 'Can add own Import'), ('change_own_import', 'Can change own Import'), ('delete_own_import', 'Can delete own Import'), ('view_gis_import', 'Can export to QGIS'), ('view_own_gis_import', 'Can export own to QGIS'), ('change_gis_import', 'Can import from QGIS'), ('change_own_gis_import', 'Can import own from QGIS')), 'verbose_name': 'Import - Import', 'verbose_name_plural': 'Import - Imports'}, + ), + migrations.AlterModelOptions( + name='importertype', + options={'ordering': ('name',), 'verbose_name': 'Importer - Type', 'verbose_name_plural': 'Importer - Types'}, + ), + migrations.AlterField( + model_name='documenttemplate', + name='export_format', + field=models.CharField(blank=True, choices=[('docx', 'DOCX'), ('html', 'HTML'), ('pdf', 'PDF'), ('xlsx', 'XLSX')], default='', max_length=4, verbose_name='Export format'), + ), + migrations.AlterField( + model_name='importertype', + name='gis_type', + field=models.ForeignKey(blank=True, help_text='For QGIS importer type. Geographic data type used for import and export.', null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.geodatatype', verbose_name='GIS Type'), + ), + migrations.AddField( + model_name='ishtarsiteprofile', + name='statementcondition_complete_identifier', + field=models.TextField(default='--TO BE DEFINED---', help_text='Formula to manage statement of condition complete identifier.', verbose_name='Statement of condition complete identifier'), + ), + migrations.AddField( + model_name='ishtarsiteprofile', + name='statementcondition_custom_index', + field=models.TextField(blank=True, default='', help_text='Keys to be used to manage statement of condition custom index. Separate keys with a semicolon.', verbose_name='Statement of condition custom index key'), + ), + ] diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 5e8107d17..40c69b753 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -271,6 +271,9 @@ post_save.connect(post_save_user, sender=User) class ValueGetter: + """ + Manage values for templates + """ _prefix = "" COL_LABELS = {} GET_VALUES_EXTRA = [] @@ -1466,6 +1469,22 @@ class IshtarSiteProfile(models.Model, Cached): "Formula to manage cached label. If not set a default formula is used." ), ) + statementcondition_complete_identifier = models.TextField( + _("Statement of condition complete identifier"), + default="--TO BE DEFINED---", + help_text=_( + "Formula to manage statement of condition complete identifier." + ), + ) + statementcondition_custom_index = models.TextField( + _("Statement of condition custom index key"), + default="", + blank=True, + help_text=_( + "Keys to be used to manage statement of condition custom index. " + "Separate keys with a semicolon." + ), + ) container_external_id = models.TextField( _("Container external id"), default="{parent_external_id}-{container_type__txt_idx}-" "{reference}", |
