Table of Contents

Class: Gadget | Twisted-0.19.0/twisted/web/widgets.py
--- | ---
I am a collection of Widgets, to be rendered through a Page Factory. self.pageFactory should be a Resource that takes a Widget in its constructor. The default is twisted.web.widgets.WidgetPage.
Base Classes |
--- | ---
resource.Resource
Methods |
--- | ---
__init__ addFile getChild getWidget pageFactory putPath putWidget render
| __init__
    __init__ ( self )
| addFile
    addFile ( self,  path )
Gadget.addFile(path) Add a static path to this Gadget. This method is obsolete, use Gadget.putPath instead.
| getChild
    getChild (
            self,
            path,
            request,
            )
| getWidget
    getWidget (
            self,
            path,
            request,
            )
| pageFactory
    pageFactory (
            self,
            *args,
            *kwargs,
            )
Gadget.pageFactory(args, kwargs) -> Resource By default, this method returns self.page(args, **kwargs). It is only for backwards-compatibility -- you should set the `pageFactory` attribute on your Gadget inside of its __init__ method.
| putPath
    putPath (
            self,
            path,
            pathname,
            )
Gadget.putPath(path, pathname) Add a static path to this Gadget. Whenever `path` is requested, twisted.web.static.File(pathname) is sent.
| putWidget
    putWidget (
            self,
            path,
            widget,
            )
Gadget.putWidget(path, widget) Add a Widget to this Gadget. It will be rendered through the pageFactory associated with this Gadget, whenever `path` is requested.
| render
    render ( self,  request )

Table of Contents

This document was automatically generated on Sun Jul 14 19:53:39 2002 by HappyDoc version 2.0