dash.contrib.plugins.weather package

Submodules

dash.contrib.plugins.weather.conf module

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

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.WeatherPlugin(layout_uid, placeholder_uid, workspace=None, user=None, position=None)[source]

Bases: dash.base.BaseDashboardPlugin

Weather dashboard plugin.

form

alias of WeatherForm

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

If no text available, use dummy.

uid = 'weather'

dash.contrib.plugins.weather.dash_widgets module

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

Bases: dash.base.BaseDashboardPluginWidget

Weather plugin widget for Android layout (placeholder main).

cols = 2
layout_uid = 'android'
media_css = ['css/dash_plugin_weather.css']
placeholder_uid = 'main'
plugin_uid = 'weather'
render(request=None)[source]
rows = 2
class dash.contrib.plugins.weather.dash_widgets.BigWeatherAndroidMainWidget(plugin)[source]

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

Big memo plugin widget for Android layout (placeholder main).

cols = 3
plugin_uid = 'big_weather'
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 = {'custom_title': <django.forms.fields.CharField object at 0x4b93710>, 'show_feed_title': <django.forms.fields.BooleanField object at 0x4b93e50>, 'cache_for': <django.forms.fields.IntegerField object at 0x4b93650>, 'public_ip': <django.forms.fields.CharField object at 0x4b93b10>, 'weather_data_json': <django.forms.fields.CharField object at 0x4b93790>}
media
plugin_data_fields = [('custom_title', ''), ('show_title', True), ('cache_for', 3600), ('public_ip', ''), ('weather_data_json', '')]
save_plugin_data()[source]

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

Read the Docs v: 0.1.4
Versions
latest
0.3.2
0.3
0.2.4
0.1.4
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.