diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-26 18:29:00 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-26 18:29:00 +0200 |
commit | 5fb235649207a15f54c69f3ac9c2f0659fc2436d (patch) | |
tree | 0b6a033a9446f485bf825d54d26518adc2e206e4 /ishtar_common | |
parent | 088239b8fbe0bd68edd66123549b064189fe5678 (diff) | |
download | Ishtar-5fb235649207a15f54c69f3ac9c2f0659fc2436d.tar.bz2 Ishtar-5fb235649207a15f54c69f3ac9c2f0659fc2436d.zip |
Towns: remove "canton" add limits - change meta for data
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/migrations/0019_auto_20171026_1827.py | 54 | ||||
-rw-r--r-- | ishtar_common/models.py | 3 |
2 files changed, 55 insertions, 2 deletions
diff --git a/ishtar_common/migrations/0019_auto_20171026_1827.py b/ishtar_common/migrations/0019_auto_20171026_1827.py new file mode 100644 index 000000000..854304837 --- /dev/null +++ b/ishtar_common/migrations/0019_auto_20171026_1827.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-10-26 18:27 +from __future__ import unicode_literals + +import django.contrib.gis.db.models.fields +import django.contrib.postgres.fields.jsonb +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0018_auto_20171017_1840'), + ] + + operations = [ + migrations.AlterModelOptions( + name='jsondatafield', + options={'ordering': ['order', 'name'], 'verbose_name': 'Json data - Field', 'verbose_name_plural': 'Json data - Fields'}, + ), + migrations.AlterModelOptions( + name='jsondatasection', + options={'ordering': ['order', 'name'], 'verbose_name': 'Json data - Menu', 'verbose_name_plural': 'Json data - Menus'}, + ), + migrations.RemoveField( + model_name='town', + name='canton', + ), + migrations.AddField( + model_name='town', + name='limit', + field=django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326, verbose_name='Limit'), + ), + migrations.AlterField( + model_name='historicalorganization', + name='data', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, db_index=True, default={}), + ), + migrations.AlterField( + model_name='historicalperson', + name='data', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, db_index=True, default={}), + ), + migrations.AlterField( + model_name='organization', + name='data', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, db_index=True, default={}), + ), + migrations.AlterField( + model_name='person', + name='data', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, db_index=True, default={}), + ), + ] diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c3ba4fdd0..a06568d99 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2659,12 +2659,11 @@ class Town(Imported, models.Model): surface = models.IntegerField(_(u"Surface (m2)"), blank=True, null=True) center = models.PointField(_(u"Localisation"), srid=settings.SRID, blank=True, null=True) + limit = models.MultiPolygonField(_(u"Limit"), blank=True, null=True) if settings.COUNTRY == 'fr': numero_insee = models.CharField(u"Numéro INSEE", max_length=6) departement = models.ForeignKey( Department, verbose_name=u"Département", null=True, blank=True) - canton = models.ForeignKey(Canton, verbose_name=u"Canton", null=True, - blank=True) year = models.IntegerField( _("Year of creation"), null=True, blank=True, help_text=_(u"Filling this field is relevant to distinguish old towns " |