Skip to content

Commit

Permalink
[Maps Model] Removing CharField 200 length limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 16, 2019
1 parent c2f0e6d commit 3a6ebef
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
35 changes: 35 additions & 0 deletions geonode/maps/migrations/0027_auto_20190516_0909.py
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-16 09:09
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('maps', '0026_auto_20190429_0831'),
]

operations = [
migrations.AlterField(
model_name='maplayer',
name='format',
field=models.TextField(blank=True, null=True, verbose_name='format'),
),
migrations.AlterField(
model_name='maplayer',
name='group',
field=models.TextField(blank=True, null=True, verbose_name='group'),
),
migrations.AlterField(
model_name='maplayer',
name='name',
field=models.TextField(null=True, verbose_name='name'),
),
migrations.AlterField(
model_name='maplayer',
name='styles',
field=models.TextField(blank=True, null=True, verbose_name='styles'),
),
]
10 changes: 4 additions & 6 deletions geonode/maps/models.py
Expand Up @@ -426,15 +426,14 @@ class MapLayer(models.Model, GXPLayerBase):
# The z-index of this layer in the map; layers with a higher stack_order will
# be drawn on top of others.

format = models.CharField(
format = models.TextField(
_('format'),
null=True,
max_length=200,
blank=True)
# The content_type of the image format to use for tiles (image/png, image/jpeg,
# image/gif...)

name = models.CharField(_('name'), null=True, max_length=200)
name = models.TextField(_('name'), null=True)
# The name of the layer to load.

# The interpretation of this name depends on the source of the layer (Google
Expand All @@ -444,10 +443,9 @@ class MapLayer(models.Model, GXPLayerBase):
opacity = models.FloatField(_('opacity'), default=1.0)
# The opacity with which to render this layer, on a scale from 0 to 1.

styles = models.CharField(
styles = models.TextField(
_('styles'),
null=True,
max_length=200,
blank=True)
# The name of the style to use for this layer (only useful for WMS layers.)

Expand All @@ -459,7 +457,7 @@ class MapLayer(models.Model, GXPLayerBase):
# A boolean value, true if we should prevent the user from dragging and
# dropping this layer in the layer chooser.

group = models.CharField(_('group'), null=True, max_length=200, blank=True)
group = models.TextField(_('group'), null=True, blank=True)
# A group label to apply to this layer. This affects the hierarchy displayed
# in the map viewer's layer tree.

Expand Down

0 comments on commit 3a6ebef

Please sign in to comment.