From 01f7de285f4e48c447f90bb5c01d3a7ca5628dd2 Mon Sep 17 00:00:00 2001 From: mattiagiupponi Date: Mon, 23 Oct 2023 12:24:34 +0200 Subject: [PATCH 1/4] Makes more clear the is_enable function in themes --- ...ter_geonodethemecustomization_is_enabled.py | 18 ++++++++++++++++++ geonode/themes/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py diff --git a/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py b/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py new file mode 100644 index 00000000000..fde05caa6e3 --- /dev/null +++ b/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.21 on 2023-10-23 10:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('geonode_themes', '0014_auto_20220214_0910'), + ] + + operations = [ + migrations.AlterField( + model_name='geonodethemecustomization', + name='is_enabled', + field=models.BooleanField(default=False, help_text='Will enable the theme GLOBALLY. Will disable the current enabled theme (if any)'), + ), + ] diff --git a/geonode/themes/models.py b/geonode/themes/models.py index 40f49478a1f..23399548c9f 100644 --- a/geonode/themes/models.py +++ b/geonode/themes/models.py @@ -54,7 +54,7 @@ class GeoNodeThemeCustomization(models.Model): name = models.CharField(max_length=100, help_text="This will not appear anywhere.") description = models.TextField(null=True, blank=True, help_text="This will not appear anywhere.") is_enabled = models.BooleanField( - default=False, help_text="Enabling this theme will disable the current enabled theme (if any)" + default=False, help_text="Will enable the theme GLOBALLY. Will disable the current enabled theme (if any)" ) logo = models.ImageField(upload_to="img/%Y/%m", null=True, blank=True) extra_css = models.TextField( From 307fbe0aa98abb3edbca46dfb5175a8325dff657 Mon Sep 17 00:00:00 2001 From: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:45:01 +0200 Subject: [PATCH 2/4] Update models.py --- geonode/themes/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geonode/themes/models.py b/geonode/themes/models.py index 23399548c9f..6790fd68be9 100644 --- a/geonode/themes/models.py +++ b/geonode/themes/models.py @@ -54,7 +54,7 @@ class GeoNodeThemeCustomization(models.Model): name = models.CharField(max_length=100, help_text="This will not appear anywhere.") description = models.TextField(null=True, blank=True, help_text="This will not appear anywhere.") is_enabled = models.BooleanField( - default=False, help_text="Will enable the theme GLOBALLY. Will disable the current enabled theme (if any)" + default=False, help_text="Set this theme as the current global theme for GeoNode. This will disable the current theme (if any)" ) logo = models.ImageField(upload_to="img/%Y/%m", null=True, blank=True) extra_css = models.TextField( From 36478b694a65186c44d3f2918d72d91241863450 Mon Sep 17 00:00:00 2001 From: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:45:22 +0200 Subject: [PATCH 3/4] Update 0015_alter_geonodethemecustomization_is_enabled.py --- .../0015_alter_geonodethemecustomization_is_enabled.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py b/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py index fde05caa6e3..fcd18f8ee3c 100644 --- a/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py +++ b/geonode/themes/migrations/0015_alter_geonodethemecustomization_is_enabled.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='geonodethemecustomization', name='is_enabled', - field=models.BooleanField(default=False, help_text='Will enable the theme GLOBALLY. Will disable the current enabled theme (if any)'), + field=models.BooleanField(default=False, help_text='Set this theme as the current global theme for GeoNode. This will disable the current theme (if any)'), ), ] From 2bf2199726ceeadd911a9a2724224201be62423d Mon Sep 17 00:00:00 2001 From: mattiagiupponi Date: Mon, 23 Oct 2023 12:50:43 +0200 Subject: [PATCH 4/4] fix format --- geonode/themes/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geonode/themes/models.py b/geonode/themes/models.py index 6790fd68be9..b94f9c6dd3c 100644 --- a/geonode/themes/models.py +++ b/geonode/themes/models.py @@ -54,7 +54,8 @@ class GeoNodeThemeCustomization(models.Model): name = models.CharField(max_length=100, help_text="This will not appear anywhere.") description = models.TextField(null=True, blank=True, help_text="This will not appear anywhere.") is_enabled = models.BooleanField( - default=False, help_text="Set this theme as the current global theme for GeoNode. This will disable the current theme (if any)" + default=False, + help_text="Set this theme as the current global theme for GeoNode. This will disable the current theme (if any)", ) logo = models.ImageField(upload_to="img/%Y/%m", null=True, blank=True) extra_css = models.TextField(