Created
September 10, 2014 16:41
-
-
Save pawl/10edd7bd2305379ef108 to your computer and use it in GitHub Desktop.
Change Single GET Parameter - Flask
This file contains 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
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