Class n.p.Element(object):

Part of nevow.page View Source View In Hierarchy

Known subclasses: nevow.athena.LiveElement

Implements interfaces: nevow.inevow.IRenderer, nevow.inevow.IRendererFactory

An Element is an object responsible for rendering part or all of a page.

Elements provide a way to separate the responsibility for page rendering into different units of code.

Elements implement IRendererFactory to return render methods which are registered using nevow.page.renderer. For example:
   class Menu(Element):
       def items(self, request, tag):
           ....
       renderer(items)
Render methods are invoked with two arguments: first, the nevow.inevow.IRequest being served and second, the tag object which "invoked" the render method.
Instance VariablesdocFactoryThe inevow.IDocFactory which will be used during rendering.
Line # Kind Name Docs
69 Method __init__ Undocumented
75 Method renderer Given a context object and a name, return a callable which responds
85 Method rend Turn this instance into stan suitable for displaying it in a web page.
def __init__(self, docFactory=None): (source)
Undocumented
def renderer(self, context, name): (source)
Given a context object and a name, return a callable which responds to the signature (context, data) or (data) and returns an object which is flattenable.
def rend(self, ctx, data): (source)
Turn this instance into stan suitable for displaying it in a web page.
API Documentation for Nevow, generated by pydoctor.