Package turbogears :: Package widgets :: Module base
[hide private]

Module base

source code

Classes [hide private]
  Enum
Enum used at js_locations which is less strict than ``turbogears.utils.Enum`` and serves our purposes as well as allowing any object with ``retrieve_javascript``, ``retrieve_css``, and ``location`` attributes to provide resources to the template when scanned in ``turbogears.controllers._process_output``.
  Widget
A TurboGears Widget.
  CompoundWidget
A widget that can contain other widgets.
  MetaWidgetsList
Metaclass for WidgetLists.
  WidgetsList
A widget list.
  Resource
A resource for your widget, like a link to external JS/CSS or inline source to include at the template the widget is displayed.
  Link
  CSSLink
  JSLink
  MochiKitLink
Specialized JSLink to allow for suppression of MochiKit inclusion.
  JSI18NWidget
This is a widget that can be used to add support for i18n of javascript texts.
  Source
  CSSSource
  JSSource
  MetaDescription
Metaclass for widget descriptions.
  WidgetDescription
A description for a Widget.
  CoreWD
  RenderOnlyWD
  CSSLinkDesc
  JSLinkDesc
  CSSSourceDesc
  JSSourceDesc
Functions [hide private]
 
load_widgets() source code
 
register_static_directory(modulename, directory)
Sets up a static directory for JavaScript and css files.
source code
 
set_with_self(self)
Return a setlike instance with all the CSSLinks and CSSSources the widget needs.
source code
Variables [hide private]
  counter = count(148)
  all_widgets = set([<class 'turbogears.widgets.base.JSSourceDes...
  static = 'turbogears.widgets'
  js_location = Enum('head', 'bodytop', 'bodybottom')
  mochikit = MochiKitLink(name='js/MochiKit.js', charset=None, d...
  jsi18nwidget = JSI18NWidget(name='widget', locale_catalog_prov...
Function Details [hide private]

register_static_directory(modulename, directory)

source code 

Sets up a static directory for JavaScript and css files. You can refer to this static directory in templates as ${tg.widgets}/modulename


Variables Details [hide private]

all_widgets

Value:
set([<class 'turbogears.widgets.base.JSSourceDesc'>,
     <class 'turbogears.widgets.base.CSSSourceDesc'>,
     <class 'turbogears.widgets.base.CSSLinkDesc'>,
     <class 'turbogears.widgets.base.JSLinkDesc'>,
     <class 'turbogears.widgets.forms.FileFieldDesc'>,
     <class 'turbogears.widgets.forms.TextAreaDesc'>,
     <class 'turbogears.widgets.forms.TextFieldDesc'>,
     <class 'turbogears.widgets.forms.HiddenFieldDesc'>,
...

mochikit

Value:
MochiKitLink(name='js/MochiKit.js', charset=None, defer=False)

jsi18nwidget

Value:
JSI18NWidget(name='widget', locale_catalog_providers=[])