I want to redirect users to same path but with different arguments.
Here's my code:
@app.route('/foo')
def foo(args1=None, args2=None):
return render_template('foo.html', args1=args1, args2=args2)
@app.route('/bar')
def redirect_to_foo():
return redirect(url_for('foo', args1='something'))
But when I see url path, that shows /foo?arg1=something...
.
How redirect with args but without query string?
Is there any way to do this?