Philippe David Philippe David - 1 year ago 93
Python Question

Tornado reverse_url encodes 'special characters' like ? and &

I'm new to Tornado and I have a problem :

href='{{ reverse_url("web-html","list-builds?bundle_identifier=" + app.bundle_identifier+ "&app_name=" + ( }}'



while I want something like :


What am I missing ? Thanks

P.S : Mac OS X 10.9, Python 2.7, Tornado 4.0.X

Answer Source

Use reverse_url to construct the base url, and then add query parameters afterwards. {{ reverse_url("web-html", "list-builds") + "?" + urlencode(dict(bundle_identifier=app.bundle_identifier)) }}

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download