dash.contrib.plugins.weather package

Submodules

dash.contrib.plugins.weather.apps module

class dash.contrib.plugins.weather.apps.Config(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

Config.

label = 'dash_contrib_plugins_weather'
name = 'dash.contrib.plugins.weather'

dash.contrib.plugins.weather.conf module

dash.contrib.plugins.weather.conf.get_setting(setting, override=None)[source]

Get setting.

Get a setting from dash.contrib.plugins.weather conf module, falling back to the default.

If override is not None, it will be used instead of the setting.

Parameters:
  • setting – String with setting name
  • override – Value to use when no setting is available. Defaults to None.
Returns:

Setting value.

dash.contrib.plugins.weather.dash_plugins module

class dash.contrib.plugins.weather.dash_plugins.BaseWeatherPlugin(layout_uid, placeholder_uid, workspace=None, user=None, position=None)[source]

Bases: dash.base.BaseDashboardPlugin

Base Weather plugin.

form

alias of WeatherForm

group = <django.utils.functional.__proxy__ object>
name = <django.utils.functional.__proxy__ object>
post_processor()[source]

Post process.

If no text available, use dummy.

dash.contrib.plugins.weather.dash_widgets module

class dash.contrib.plugins.weather.dash_widgets.BaseWeatherWidget(plugin)[source]

Bases: dash.base.BaseDashboardPluginWidget

Base weather plugin widget.

media_css = ['css/dash_plugin_weather.css']
render(request=None)[source]

Render.

class dash.contrib.plugins.weather.dash_widgets.Weather2x2Widget(plugin)[source]

Bases: dash.contrib.plugins.weather.dash_widgets.BaseWeatherWidget

Weather plugin 2x2 widget.

cols = 2
plugin_uid = 'weather_2x2'
rows = 2
class dash.contrib.plugins.weather.dash_widgets.Weather3x3Widget(plugin)[source]

Bases: dash.contrib.plugins.weather.dash_widgets.BaseWeatherWidget

Weather plugin 3x3 widget.

cols = 3
plugin_uid = 'weather_3x3'
rows = 3

dash.contrib.plugins.weather.defaults module

dash.contrib.plugins.weather.forms module

class dash.contrib.plugins.weather.forms.WeatherForm(*args, **kwargs)[source]

Bases: django.forms.forms.Form, dash.base.DashboardPluginFormBase

Form for main WeatherPlugin.

base_fields = OrderedDict([('custom_title', <django.forms.fields.CharField object>), ('show_feed_title', <django.forms.fields.BooleanField object>), ('cache_for', <django.forms.fields.IntegerField object>), ('public_ip', <django.forms.fields.CharField object>), ('weather_data_json', <django.forms.fields.CharField object>)])
declared_fields = OrderedDict([('custom_title', <django.forms.fields.CharField object>), ('show_feed_title', <django.forms.fields.BooleanField object>), ('cache_for', <django.forms.fields.IntegerField object>), ('public_ip', <django.forms.fields.CharField object>), ('weather_data_json', <django.forms.fields.CharField object>)])
media
plugin_data_fields = [('custom_title', ''), ('show_title', True), ('cache_for', 3600), ('public_ip', ''), ('weather_data_json', '')]
save_plugin_data(request=None)[source]

Save plugin data.

For showing the weather, we need an IP address. Although we don’t make it possible for the user to specify it manually, we silently obtain it and save into the plugin data.

dash.contrib.plugins.weather.settings module

Module contents