diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-01-09 15:20:00 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:40:54 +0200 |
commit | 739a36dc0f006a206e24c96324cda192d5b6837b (patch) | |
tree | aa0b2db202c25b3519c7c18a077ad2d5c734ff86 /ishtar_common | |
parent | 9e2cedc18a4edfe280be76d698d5523f98506de8 (diff) | |
download | Ishtar-739a36dc0f006a206e24c96324cda192d5b6837b.tar.bz2 Ishtar-739a36dc0f006a206e24c96324cda192d5b6837b.zip |
🏷️ add default data types for geo origin and buffer
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/fixtures/initial_geo-fr.json | 15 | ||||
-rw-r--r-- | ishtar_common/migrations/0235_default_geo_types.py | 43 |
2 files changed, 56 insertions, 2 deletions
diff --git a/ishtar_common/fixtures/initial_geo-fr.json b/ishtar_common/fixtures/initial_geo-fr.json index a7563cb85..e84d4fbdb 100644 --- a/ishtar_common/fixtures/initial_geo-fr.json +++ b/ishtar_common/fixtures/initial_geo-fr.json @@ -530,7 +530,18 @@ "comment": "", "available": true, "parent": null, - "order": 10 + "order": 40 + } +}, +{ + "model": "ishtar_common.geoorigintype", + "fields": { + "label": "Vectorisation de photographies a\u00e9riennes", + "txt_idx": "vectorisation-de-photographie-aerienne", + "comment": "", + "available": true, + "parent": null, + "order": 30 } }, { @@ -541,7 +552,7 @@ "comment": "", "available": true, "parent": null, - "order": 10 + "order": 20 } }, { diff --git a/ishtar_common/migrations/0235_default_geo_types.py b/ishtar_common/migrations/0235_default_geo_types.py new file mode 100644 index 000000000..2177f351a --- /dev/null +++ b/ishtar_common/migrations/0235_default_geo_types.py @@ -0,0 +1,43 @@ +# Generated by Django 2.2.24 on 2024-01-09 14:57 + +from django.db import migrations + + +def create_data(apps, __): + GeoOriginType = apps.get_model("ishtar_common", "GeoOriginType") + GeoOriginType.objects.get_or_create( + txt_idx="releve-topographique", + defaults={"label": "Relevé topographique", "available": True, "order": 10} + ) + GeoOriginType.objects.get_or_create( + txt_idx="releve-gps", + defaults={"label": "Relevé GPS", "available": True, "order": 20} + ) + GeoOriginType.objects.get_or_create( + txt_idx="vectorisation-de-photographie-aerienne", + defaults={"label": "Vectorisation de photographie aérienne", "available": True, "order": 30} + ) + GeoOriginType.objects.get_or_create( + txt_idx="vectorisation-de-carte-ancienne", + defaults={"label": "Vectorisation de carte ancienne", "available": True, "order": 40} + ) + GeoBufferType = apps.get_model("ishtar_common", "GeoBufferType") + GeoBufferType.objects.get_or_create( + txt_idx="incertitude", + defaults={"label": "Incertitude", "available": True, "order": 10} + ) + GeoBufferType.objects.get_or_create( + txt_idx="rayon-de-collecte", + defaults={"label": "Rayon de collecte", "available": True, "order": 20} + ) + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0234_gdprlog_gdprperson'), + ] + + operations = [ + migrations.RunPython(create_data) + ] |