Package turbogears :: Package widgets :: Module base

Module base

source code

Base TurboGears widget implementation

Classes
  Widget
A TurboGears Widget.
  CompoundWidget
A widget that can contain other widgets.
  WidgetsList
A widget list.
  Resource
A resource for your widget.
  Link
A widget resource that is a link.
  CSSLink
A CSS link.
  JSLink
A JavaScript link.
  Source
  CSSSource
A CSS source snippet.
  JSSource
A JavaScript source snippet.
  WidgetDescription
A description for a Widget.
Functions
 
load_widgets()
Load all widgets provided by the widget entry point.
source code
 
register_static_directory(modulename, directory)
Set up a static directory for JavaScript and CSS files.
source code
 
set_with_self(self)
Return the needed CSS resources.
source code
Variables
  all_widgets = set([<class 'turbogears.widgets.big_widgets.Auto...
  static = 'turbogears.widgets'
  js_location = Enum('head', 'bodytop', 'bodybottom')
  mochikit = TGMochiKit(name='widget', charset=None, defer=False...
  jsi18nwidget = JSI18NWidget(name='widget', locale_catalog_prov...
Function Details

register_static_directory(modulename, directory)

source code 

Set up a static directory for JavaScript and CSS files.

You can refer to this static directory in templates as ${tg.widgets}/modulename


Variables Details

all_widgets

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

mochikit

Value:
TGMochiKit(name='widget', charset=None, defer=False, order=0)

jsi18nwidget

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