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.Weather2x2Plugin(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 0x60cc090>
name = <django.utils.functional.__proxy__ object at 0x60cc450>
post_processor()[source]

If no text available, use dummy.

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

Bases: dash.contrib.plugins.weather.dash_plugins.Weather2x2Plugin

Big weather dashboard plugin.

group = <django.utils.functional.__proxy__ object at 0x5c799d0>
name = <django.utils.functional.__proxy__ object at 0x5c79790>
uid = 'weather_3x3'

dash.contrib.plugins.weather.dash_widgets module

class dash.contrib.plugins.weather.dash_widgets.Weather2x2AndroidMainWidget(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_2x2'
render(request=None)[source]
rows = 2
class dash.contrib.plugins.weather.dash_widgets.Weather3x3AndroidMainWidget(plugin)[source]

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

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

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 = {'custom_title': <django.forms.fields.CharField object at 0x4688c50>, 'show_feed_title': <django.forms.fields.BooleanField object at 0x4688610>, 'cache_for': <django.forms.fields.IntegerField object at 0x60ce210>, 'public_ip': <django.forms.fields.CharField object at 0x60ce9d0>, 'weather_data_json': <django.forms.fields.CharField object at 0x60ce410>}
media
plugin_data_fields = [('custom_title', ''), ('show_title', True), ('cache_for', 3600), ('public_ip', ''), ('weather_data_json', '')]
save_plugin_data(request=None)[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.3.2
Versions
latest
0.3.2
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.