Changing A Single GET Parameter In Request - Flask
This file contains hidden or 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)) |