class documentation

class Plating: (source)

View In Hierarchy

A Plating is a container which can be used to generate HTML from data.

Its name is derived both from tem-plating and chrome plating.

Method __init__ Undocumented
Method renderMethod Add a render method to this Plating object that can be used in the top-level template.
Method routed Undocumented
Method widgeted A decorator that turns a function into a renderer for an element without a Klein.route. Use this to create reusable template elements.
Constant CONTENT Undocumented
Class _Widget Implementation of Plating.widgeted. This is a callable descriptor that records the instance to which its wrapped function is bound, if any. Its widget method then passes that instance or None and the result of invoking the function (or now bound method) to the creating ...
Method _elementify Convert this Plating into a PlatedElement.
Instance Variable _defaults Undocumented
Instance Variable _loader Undocumented
Instance Variable _presentationSlots Undocumented
Instance Variable _renderers Undocumented
def __init__(self, defaults=None, tags=None, presentation_slots=()): (source)

Undocumented

def renderMethod(self, renderer): (source)

Add a render method to this Plating object that can be used in the top-level template.

The name of the renderer to use within the template is the name of the decorated function.

def routed(self, routing, tags): (source)

Undocumented

def widgeted(self, function): (source)

A decorator that turns a function into a renderer for an element without a Klein.route. Use this to create reusable template elements.

CONTENT: str = (source)

Undocumented

Value
'klein:plating:content'
def _elementify(self, instance, to_fill_with): (source)

Convert this Plating into a PlatedElement.

_defaults = (source)

Undocumented

_loader = (source)

Undocumented

_presentationSlots = (source)

Undocumented

_renderers: dict = (source)

Undocumented