MCPcopy
hub / github.com/epinna/tplmap / putfunc

Function putfunc

tests/env_py_tests/webserver.py:93–103  ·  view source on GitHub ↗
(engine)

Source from the content-addressed store, hash-verified

91
92@app.route("/put/<engine>", methods = [ "PUT" ])
93def putfunc(engine):
94
95 template = request.values.get('tpl')
96 if not template:
97 template = '%s'
98
99 injection = request.values.get('inj')
100 if engine == 'mako':
101 return randomword() + MakoTemplates(template % injection, lookup=mylookup).render() + randomword()
102 elif engine == 'jinja2':
103 return randomword() + Jinja2Env.from_string(template % injection).render() + randomword()
104
105@app.route("/limit/<engine>")
106def limited(engine):

Callers

nothing calls this directly

Calls 3

randomwordFunction · 0.85
getMethod · 0.80
renderMethod · 0.80

Tested by

no test coverage detected