I am trying to work with querys in Flask. I have a page choose.html where you can click buttons. these should be sent in a query then to page 2. So page 2 should be rendered by Flask with the query e.g.
127.0.0.1/login?username=test&color=3
I have tried the following so far (hard coded):
<a href="{{ url_for('login?username=test&color=3') }}"><button class="continue" id="submit" name="submit">Continue</button></a>
@app.route('/login', methods=['post', 'get'])
def login():
message = request.args.get('username')
That was the response: werkzeug.routing.BuildError: Could not build url for endpoint 'login?username=test'. Did you mean 'login' instead?