Skip to content

Instantly share code, notes, and snippets.

@pawl
Created September 10, 2014 16:41
Show Gist options
  • Save pawl/10edd7bd2305379ef108 to your computer and use it in GitHub Desktop.
Save pawl/10edd7bd2305379ef108 to your computer and use it in GitHub Desktop.
Change Single GET Parameter - Flask
from application import app
from flask import request, url_for, redirect
@app.route('/')
def index():
modified_args = dict(request.args)
modified_args['key'] = 'modified_value'
return redirect(url_for('my_view', **modified_args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment