Created
September 12, 2015 20:17
-
-
Save onny/c7ca3509e223493cb684 to your computer and use it in GitHub Desktop.
Bottlepy get parameters utf8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from bottle import route, run, template, request | |
@route('/hello/<name>') | |
def index(name): | |
prename = request.query['prename'] | |
return template('<b>Hello {{prename}} {{name}}</b>!', name=name, prename=prename) | |
run(host='localhost', port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test it with: http://127.0.0.1:8080/hello/M%C3%BCstermann?prename=M%C3%A4x