MCPcopy
hub / github.com/pyload/pyload / apply

Method apply

module/lib/bottle.py:1512–1522  ·  view source on GitHub ↗
(self, callback, route)

Source from the content-addressed store, hash-verified

1510 api = 2
1511
1512 def apply(self, callback, route):
1513 conf = route.config.get('template')
1514 if isinstance(conf, (tuple, list)) and len(conf) == 2:
1515 return view(conf[0], **conf[1])(callback)
1516 elif isinstance(conf, str) and 'template_opts' in route.config:
1517 depr('The `template_opts` parameter is deprecated.') #0.9
1518 return view(conf, **route.config['template_opts'])(callback)
1519 elif isinstance(conf, str):
1520 return view(conf)(callback)
1521 else:
1522 return callback
1523
1524
1525#: Not a plugin, but part of the plugin API. TODO: Find a better place.

Callers

nothing calls this directly

Calls 3

viewFunction · 0.85
deprFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected