Did I find the right examples for you? yes no

All Samples(8)  |  Call(0)  |  Derive(0)  |  Import(8)
bool(x) -> bool

Returns True when the argument x is true, False otherwise.
The builtins True and False are the only two instances of the class bool.
The class bool is a subclass of the class int, and cannot be subclassed.

src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/rss_feed/forms.py   django-dash(Download)
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_MAX_FEED_ITEMS, DEFAULT_TRUNCATE_AFTER, DEFAULT_CACHE_FOR
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE
 
class ReadRSSFeedForm(forms.Form, DashboardPluginFormBase):
        ("feed_url", ""),
        ("custom_feed_title", ""),
        ("show_feed_title", DEFAULT_SHOW_TITLE),
        ("max_items", DEFAULT_MAX_FEED_ITEMS),
        ("truncate_after", DEFAULT_TRUNCATE_AFTER),
        ("cache_for", DEFAULT_CACHE_FOR)
    ]
    feed_url = forms.URLField(label=_("Feed URL"), required=True)
    custom_feed_title = forms.CharField(label=_("Custom feed title"), required=False)
    show_feed_title = forms.BooleanField(label=_("Show feed title?"), required=False, initial=DEFAULT_SHOW_TITLE, \

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/rss_feed/forms.py   django-dash(Download)
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_MAX_FEED_ITEMS, DEFAULT_TRUNCATE_AFTER, DEFAULT_CACHE_FOR
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE
 
class ReadRSSFeedForm(forms.Form, DashboardPluginFormBase):
        ("feed_url", ""),
        ("custom_feed_title", ""),
        ("show_feed_title", DEFAULT_SHOW_TITLE),
        ("max_items", DEFAULT_MAX_FEED_ITEMS),
        ("truncate_after", DEFAULT_TRUNCATE_AFTER),
        ("cache_for", DEFAULT_CACHE_FOR)
    ]
    feed_url = forms.URLField(label=_("Feed URL"), required=True)
    custom_feed_title = forms.CharField(label=_("Custom feed title"), required=False)
    show_feed_title = forms.BooleanField(label=_("Show feed title?"), required=False, initial=DEFAULT_SHOW_TITLE, \

src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/weather/forms.py   django-dash(Download)
from dash.base import DashboardPluginFormBase
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE, DEFAULT_CACHE_FOR
 
import logging
    plugin_data_fields = [
        ("custom_title", ""),
        ("show_title", DEFAULT_SHOW_TITLE),
        ("cache_for", DEFAULT_CACHE_FOR),
        ("public_ip", ""),
        ("weather_data_json", "")
 
    ]
    custom_title = forms.CharField(label=_("Custom title"), required=False)
    show_feed_title = forms.BooleanField(label=_("Show title?"), required=False, initial=DEFAULT_SHOW_TITLE, \

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/weather/forms.py   django-dash(Download)
from dash.base import DashboardPluginFormBase
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE, DEFAULT_CACHE_FOR
 
import logging
    plugin_data_fields = [
        ("custom_title", ""),
        ("show_title", DEFAULT_SHOW_TITLE),
        ("cache_for", DEFAULT_CACHE_FOR),
        ("public_ip", ""),
        ("weather_data_json", "")
 
    ]
    custom_title = forms.CharField(label=_("Custom title"), required=False)
    show_feed_title = forms.BooleanField(label=_("Show title?"), required=False, initial=DEFAULT_SHOW_TITLE, \

src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/rss_feed/views.py   django-dash(Download)
from django.views.decorators.csrf import csrf_exempt
 
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE, DEFAULT_TRUNCATE_AFTER, DEFAULT_MAX_FEED_ITEMS
from dash.contrib.plugins.rss_feed.forms import ReadRSSFeedForm
from dash.contrib.plugins.rss_feed.helpers import max_num_template
        feed_url = form.cleaned_data.get('feed_url')
        custom_feed_title = form.cleaned_data.get('custom_feed_title', None)
        show_feed_title = form.cleaned_data.get('show_feed_title', DEFAULT_SHOW_TITLE)
        max_items = form.cleaned_data.get('max_items')
        truncate_after = form.cleaned_data.get('truncate_after', DEFAULT_TRUNCATE_AFTER)

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/rss_feed/views.py   django-dash(Download)
from django.views.decorators.csrf import csrf_exempt
 
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE, DEFAULT_TRUNCATE_AFTER, DEFAULT_MAX_FEED_ITEMS
from dash.contrib.plugins.rss_feed.forms import ReadRSSFeedForm
from dash.contrib.plugins.rss_feed.helpers import max_num_template
        feed_url = form.cleaned_data.get('feed_url')
        custom_feed_title = form.cleaned_data.get('custom_feed_title', None)
        show_feed_title = form.cleaned_data.get('show_feed_title', DEFAULT_SHOW_TITLE)
        max_items = form.cleaned_data.get('max_items')
        truncate_after = form.cleaned_data.get('truncate_after', DEFAULT_TRUNCATE_AFTER)

src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/news/forms.py   django-dash(Download)
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.news.defaults import DEFAULT_MAX_NEWS_ITEMS, DEFAULT_TRUNCATE_AFTER, DEFAULT_CACHE_FOR
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE
 
class NewsForm(forms.Form, DashboardPluginFormBase):
    """
    Form for main ``NewsPlugin``.
    """
    plugin_data_fields = [
        ("show_title", DEFAULT_SHOW_TITLE),
        ("cache_for", DEFAULT_CACHE_FOR)
    ]
    show_title = forms.BooleanField(label=_("Show title?"), required=False, initial=DEFAULT_SHOW_TITLE, \
                                    widget=BooleanRadioSelect)
    max_items = forms.IntegerField(label=_("Max feed items to show"), required=True, initial=DEFAULT_MAX_NEWS_ITEMS)

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/news/forms.py   django-dash(Download)
from dash.widgets import BooleanRadioSelect
from dash.contrib.plugins.news.defaults import DEFAULT_MAX_NEWS_ITEMS, DEFAULT_TRUNCATE_AFTER, DEFAULT_CACHE_FOR
from dash.contrib.plugins.rss_feed.defaults import DEFAULT_SHOW_TITLE
 
class NewsForm(forms.Form, DashboardPluginFormBase):
    """
    Form for main ``NewsPlugin``.
    """
    plugin_data_fields = [
        ("show_title", DEFAULT_SHOW_TITLE),
        ("cache_for", DEFAULT_CACHE_FOR)
    ]
    show_title = forms.BooleanField(label=_("Show title?"), required=False, initial=DEFAULT_SHOW_TITLE, \
                                    widget=BooleanRadioSelect)
    max_items = forms.IntegerField(label=_("Max feed items to show"), required=True, initial=DEFAULT_MAX_NEWS_ITEMS)