diff --git a/forecastmanager/forecast_settings.py b/forecastmanager/forecast_settings.py index 3a33141..18325ee 100644 --- a/forecastmanager/forecast_settings.py +++ b/forecastmanager/forecast_settings.py @@ -102,6 +102,7 @@ class ForecastDataParameters(Orderable): default="numeric") parameter_unit = models.CharField(_("Unit of measurement"), max_length=100, null=True, blank=True, help_text="e.g °C, %, mm, hPa, etc ") + show_on_home_widget = models.BooleanField(default=True, verbose_name=_("Show on Home Widget")) panels = [ FieldPanel('use_known_parameters'), @@ -109,6 +110,7 @@ class ForecastDataParameters(Orderable): FieldPanel('name'), FieldPanel('parameter_type'), FieldPanel('parameter_unit'), + FieldPanel('show_on_home_widget'), ] def __str__(self): diff --git a/forecastmanager/migrations/0027_forecastdataparameters_show_on_home_widget.py b/forecastmanager/migrations/0027_forecastdataparameters_show_on_home_widget.py new file mode 100644 index 0000000..d1e8165 --- /dev/null +++ b/forecastmanager/migrations/0027_forecastdataparameters_show_on_home_widget.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.3 on 2024-07-17 10:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('forecastmanager', '0026_alter_forecastperiod_unique_together_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='forecastdataparameters', + name='show_on_home_widget', + field=models.BooleanField(default=True, verbose_name='Show on Home Widget'), + ), + ] diff --git a/setup.cfg b/setup.cfg index 29ee045..bb48852 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = forecastmanager -version = 0.5.1 +version = 0.5.2 description = Integration of Weather City Forecasts Manager in Wagtail Projects. long_description = file:README.md long_description_content_type = text/markdown