I'm curious if anyone has come up with a good solution for passing unknown URL arguments in flask. I think there has to be an easy solution that I just am totally blanking on. Any help is appreciated.
Let's say I have www.example.com?foo=baz&bar=buzz
@app.route('/')
def index():
foo = request.args.get('foo',None)
bar = request.args.get('bar',None)
return redirect(url_for('args', foo=foo, bar=bar, _external=True))
What I can't seem to figure out is a good way to pass along any unknown arguments. If I have www.example.com?foo=baz&bar=buzz&bing=bang or www.example.com?this=that coming to the same route I need to get any/and all arguments to pass along to the next view.
**request.args(untested), that is passing request.args multidict as keywords arguments.