From b6b97b2bdb9cb009a4d8257363c0c0739903c8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 15 Jan 2019 08:24:16 +0100 Subject: [PATCH] dataviz: allow setting a template URL in gauges (#29753) --- combo/apps/dataviz/migrations/0001_initial.py | 2 +- combo/apps/dataviz/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/combo/apps/dataviz/migrations/0001_initial.py b/combo/apps/dataviz/migrations/0001_initial.py index d62eaa8e..51dff8ff 100644 --- a/combo/apps/dataviz/migrations/0001_initial.py +++ b/combo/apps/dataviz/migrations/0001_initial.py @@ -22,7 +22,7 @@ class Migration(migrations.Migration): ('public', models.BooleanField(default=True, verbose_name='Public')), ('restricted_to_unlogged', models.BooleanField(default=False, verbose_name='Restrict to unlogged users')), ('title', models.CharField(max_length=150, null=True, verbose_name='Title', blank=True)), - ('url', models.URLField(max_length=150, null=True, verbose_name='URL', blank=True)), + ('url', models.CharField(max_length=150, null=True, verbose_name='URL', blank=True)), ('data_source', models.CharField(max_length=150, null=True, verbose_name='Data Source', blank=True)), ('max_value', models.PositiveIntegerField(null=True, verbose_name='Max Value', blank=True)), ('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)), diff --git a/combo/apps/dataviz/models.py b/combo/apps/dataviz/models.py index 828708b0..e5071bbd 100644 --- a/combo/apps/dataviz/models.py +++ b/combo/apps/dataviz/models.py @@ -27,7 +27,7 @@ from combo.utils import get_templated_url @register_cell_class class Gauge(CellBase): title = models.CharField(_('Title'), max_length=150, blank=True, null=True) - url = models.URLField(_('URL'), max_length=150, blank=True, null=True) + url = models.CharField(_('URL'), max_length=150, blank=True, null=True) data_source = models.CharField(_('Data Source'), max_length=150, blank=True, null=True) jsonp_data_source = models.BooleanField(_('Use JSONP to get data'), default=True) max_value = models.PositiveIntegerField(_('Max Value'), blank=True, null=True)