Skip to content

Commit 60b883e

Browse files
authored
Merge pull request #30 from wmo-raf/dev
Add show_conditions_label_on_widget field to ForecastSetting
2 parents 9c971c1 + 1477f07 commit 60b883e

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

forecastmanager/forecast_settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ForecastSetting(ClusterableModel, BaseSiteSetting):
2525
weather_detail_page = models.ForeignKey("wagtailcore.Page", blank=True, null=True, on_delete=models.SET_NULL, )
2626
weather_reports_page = models.ForeignKey("wagtailcore.Page", blank=True, null=True, on_delete=models.SET_NULL,
2727
related_name="weather_reports_page")
28+
show_conditions_label_on_widget = models.BooleanField(default=True,
29+
verbose_name=_("Show conditions label on widget"))
2830

2931
edit_handler = TabbedInterface([
3032
ObjectList([
@@ -43,6 +45,7 @@ class ForecastSetting(ClusterableModel, BaseSiteSetting):
4345
FieldPanel('default_city'),
4446
FieldPanel('weather_detail_page'),
4547
FieldPanel('weather_reports_page'),
48+
FieldPanel('show_conditions_label_on_widget'),
4649
], heading=_("Other Settings")),
4750
])
4851

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.3 on 2024-07-18 07:49
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('forecastmanager', '0027_forecastdataparameters_show_on_home_widget'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='forecastsetting',
15+
name='show_conditions_label_on_widget',
16+
field=models.BooleanField(default=True, verbose_name='Show conditions label on widget'),
17+
),
18+
]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = forecastmanager
3-
version = 0.5.2
3+
version = 0.5.3
44
description = Integration of Weather City Forecasts Manager in Wagtail Projects.
55
long_description = file:README.md
66
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)