Interface n.i.IDocFactory(Interface):

Part of nevow.inevow View Source View In Hierarchy

Known implementations: nevow.loaders.htmlfile, nevow.loaders.htmlstr, nevow.loaders.stan, nevow.loaders.xmlfile, nevow.loaders.xmlstr

Interface for objects that load and parse templates for Nevow's renderers.

The load method's context arg is optional. Loaders should be written to cope with no context arg and either create a new context (if necessary) or raise a ValueError if the context of the caller is important.

If a context is passed to load() it should *not* be passed on to the flattener/precompiler; a new context should be created if necessary. This measure is to ensure that nothing remembered in the caller's context, i.e. personal information in the session, leaks into the template until it is actually rendered.
Line # Kind Name Docs
483 Method load Load a template and return a stan document tree.
def load(ctx=None, preprocessors=()): (source)
Load a template and return a stan document tree.
ParameterspreprocessorsAn iterable of one-argument callables which will be given the stan document tree to transform before it is compiled.
API Documentation for Nevow, generated by pydoctor.