(engine)
| 77 | |
| 78 | @app.route("/header/<engine>") |
| 79 | def headerfunc(engine): |
| 80 | |
| 81 | template = request.headers.get('tpl') |
| 82 | if not template: |
| 83 | template = '%s' |
| 84 | |
| 85 | injection = request.headers.get('User-Agent') |
| 86 | |
| 87 | if engine == 'mako': |
| 88 | return randomword() + MakoTemplates(template % injection, lookup=mylookup).render() + randomword() |
| 89 | elif engine == 'jinja2': |
| 90 | return randomword() + Jinja2Env.from_string(template % injection).render() + randomword() |
| 91 | |
| 92 | @app.route("/put/<engine>", methods = [ "PUT" ]) |
| 93 | def putfunc(engine): |
nothing calls this directly
no test coverage detected