errbot.core_plugins.wsview module¶
-
class
errbot.core_plugins.wsview.
DynamicBottle
(catchall=True, autojson=True)[source]¶ Bases:
bottle.Bottle
-
errbot.core_plugins.wsview.
template
(*args, **kwargs)¶ Get a rendered template as a string iterator. You can use a name, a filename or a template string as first parameter. Template rendering arguments can be passed as dictionaries or directly (as keyword arguments).
-
errbot.core_plugins.wsview.
view
(tpl_name, **defaults)¶ Decorator: renders a template for a handler. The handler can control its behavior like that:
- return a dict of template vars to fill out the template
- return something other than a dict and the view decorator will not process the template, but return the handler result as is. This includes returning a HTTPResponse(dict) to get, for instance, JSON with autojson or other castfilters.
Previous: errbot.core_plugins.webserver module
|
Next: errbot.rendering package