Philippe David
Philippe David

Reputation: 8924

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=" + (app.name)) }}'

outputs:

//list-builds%3Fbundle_identifier%3Dcom.redflagdeals.rfd2%26app_name%3DRFD2

while I want something like :

//list-builds?bundle_identifier=com.redflagdeals.rfd2&app_name=RFD2

What am I missing ? Thanks

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

Upvotes: 0

Views: 515

Answers (1)

Ben Darnell
Ben Darnell

Reputation: 22154

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)) }}

Upvotes: 1

Related Questions