Answer the question
In order to leave comments, you need to log in
Redirect to current page with new param in flask?
Hello.
The task is quite trivial, but I have been racking my brains over its solution for more than 2 days.
<div class="currenty-converter">
<form method="post" action="" id="currency-set">
<div class="current-currency">
<span class="cur-label">Отображать цены в:</span><strong>{{price}}</strong>
</div>
<ul class="currency-list currency-toogle">
<li>
<a title="Dollar (USD)" href="">Долларах (USD) </a>
</li>
<li>
<a title="Rubles (BYN)" href="">Рублях (BYN)</a>
</li>
</ul>
</form>
</div>
Answer the question
In order to leave comments, you need to log in
Works, without `context_processor`, and not quite right, but it works :) :
<div class="currenty-converter">
<form method="post" action="" id="currency-set">
<div class="current-currency">
<span class="cur-label">Отображать цены в: </span><strong>{{request.args.get('v')}}</strong>
</div>
<ul class="currency-list currency-toogle">
<li>
<a title="Dollar (USD)" href="{{url_for(request.endpoint, v='USD')}}">Долларах (USD) </a>
</li>
<li>
<a title="Rubles (BYN)" href="{{url_for(request.endpoint, v='BYN')}}">Рублях (BYN)</a>
</li>
</ul>
</form>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question