A
A
Andrey Grinevich2014-08-04 23:41:22
Flask
Andrey Grinevich, 2014-08-04 23:41:22

How to save get parameters when navigating to other website urls in Flask?

Good day.
I ran into such a problem, you need to store the get parameter (lang=ru/us) when following links, now it's a crutch that takes a parameter from the request and appends it to the end of the url.
I also met such ways to store the language mysite/ru/hello
But I also don’t quite understand how to implement it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
euspensky, 2014-08-08
@Derfirm

if you need to pass only one parameter - links can be generated like this
or, if you want to pass all parameters
<a href="{{url_for('test', **request.args)}}">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question