Tuesday, April 1, 2014

Print URL With Request Parameters/Arguments - Python Flask / Jinja2

You need to add the following to your jinja2 template:
{{ request.path ~ '?' ~ request.query_string }}

You can also print only the Get Variables / URL Parameters / Argument String with the following:
print request.query_string

The example is available here: http://stackoverflow.com/a/11781872/1364191

No comments:

Post a Comment