errbot.core_plugins.wsview module

class errbot.core_plugins.wsview.DynamicBottle(catchall=True, autojson=True)[source]

Bases: bottle.Bottle

__init__(catchall=True, autojson=True)[source]

Initialize self. See help(type(self)) for accurate signature.

class errbot.core_plugins.wsview.WebView(func, form_param, raw)[source]

Bases: object

__init__(func, form_param, raw)[source]

Initialize self. See help(type(self)) for accurate signature.


Zap everything here, useful for unit tests


Check for functions to route in obj and route them.

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.