Skip to content

Commit

Permalink
Merge pull request #29 from wmo-raf/dev
Browse files Browse the repository at this point in the history
Update to ForecastDataParameters
  • Loading branch information
erick-otenyo authored Jul 17, 2024
2 parents 5d23e9d + 4b3f714 commit 9c971c1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions forecastmanager/forecast_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,15 @@ 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'),
FieldPanel('parameter', widget=DataParameterWidget),
FieldPanel('name'),
FieldPanel('parameter_type'),
FieldPanel('parameter_unit'),
FieldPanel('show_on_home_widget'),
]

def __str__(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -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'),
),
]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9c971c1

Please sign in to comment.