diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-24 01:19:38 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-24 01:19:38 +0200 |
commit | 412f474c2154731d9ba9f46f89f96dedba402418 (patch) | |
tree | 8e58a966dbf43f064694376c7a68999153f64bd9 | |
parent | 4a361bad1d0ff12f4df72887ad05fd8b4557590e (diff) | |
download | Chimère-412f474c2154731d9ba9f46f89f96dedba402418.tar.bz2 Chimère-412f474c2154731d9ba9f46f89f96dedba402418.zip |
Add description to polygon and routes (refs #3440)
-rw-r--r-- | chimere/admin.py | 4 | ||||
-rw-r--r-- | chimere/migrations/0006_auto_20170724_0115.py | 24 | ||||
-rw-r--r-- | chimere/models.py | 2 |
3 files changed, 25 insertions, 5 deletions
diff --git a/chimere/admin.py b/chimere/admin.py index 1295cf5..99ef31e 100644 --- a/chimere/admin.py +++ b/chimere/admin.py @@ -304,14 +304,10 @@ MARKER_FIELDSETS = [ ROUTE_FIELDSETS = deepcopy(MARKER_FIELDSETS) ROUTE_FIELDSETS[0][1]['fields'][0] = 'route' -ROUTE_FIELDSETS[0][1]['fields'].pop(ROUTE_FIELDSETS[0][1]['fields'].index( - 'description')) ROUTE_FIELDSETS[3][1]['fields'] = ('ref_item', 'associated_file', 'read_from_file') POLYGON_FIELDSETS = deepcopy(MARKER_FIELDSETS) POLYGON_FIELDSETS[0][1]['fields'][0] = 'polygon' -POLYGON_FIELDSETS[0][1]['fields'].pop(POLYGON_FIELDSETS[0][1]['fields'].index( - 'description')) class MarkerAdmin(admin.ModelAdmin): diff --git a/chimere/migrations/0006_auto_20170724_0115.py b/chimere/migrations/0006_auto_20170724_0115.py new file mode 100644 index 0000000..bd31328 --- /dev/null +++ b/chimere/migrations/0006_auto_20170724_0115.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('chimere', '0005_auto_20170305_1704'), + ] + + operations = [ + migrations.AddField( + model_name='polygon', + name='description', + field=models.TextField(blank=True, verbose_name='Description', null=True), + ), + migrations.AddField( + model_name='route', + name='description', + field=models.TextField(blank=True, verbose_name='Description', null=True), + ), + ] diff --git a/chimere/models.py b/chimere/models.py index 7d953cd..bba0d15 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -558,6 +558,7 @@ class Overlay(models.Model): class GeographicItem(models.Model): categories = SelectMultipleField(SubCategory) name = models.TextField(_("Name")) + description = models.TextField(_("Description"), blank=True, null=True) submiter_session_key = models.CharField( _("Submitter session key"), blank=True, null=True, max_length=40) submiter_name = models.CharField(_("Submitter name or nickname"), @@ -880,7 +881,6 @@ class Marker(GeographicItem): srid=settings.CHIMERE_EPSG_DISPLAY_PROJECTION) available_date = models.DateTimeField(_("Available Date"), blank=True, null=True) # used by feeds - description = models.TextField(_("Description"), blank=True, null=True) is_front_page = models.NullBooleanField(_("Is front page"), blank=True, null=True) objects = models.GeoManager() |