'Django how to remove #modal from url
I have a modal for confirm the action and this modal adds #modal to url but after i submit the url it stil there in the url even after i did redirect in views.py
<div class="wf-modal" aria-hidden="true" id="{{sepet.id}}">
<article class="wf-dialog-modal">
<form action="" method="post">
{% csrf_token %}
<div class="wf-content-modal">
<input type="hidden" name="cancel-id" value="{{sepet.id}}">
<label for="sebep">{%if sepet.siparis_durumu.durum == "Kargoya Verildi"%}İade{%else%}İptal{%endif%} Sebebi: </label>
<textarea name="sebep" style="resize: none; margin-left: 2px;" cols="40" rows="5" {%if sepet.siparis_durumu.durum == "Kargoya Verildi"%}required{%endif%}></textarea>
</div>
<footer class="wf-footer-modal">
<button name="gonder" value="gonder">Gönder</button>
<a href=""><button name="iptal" type="button">İptal</button></a>
</footer>
</form>
</article>
</div>
views.py
if req.get('gonder'):
if ...:
return redirect('/hesabim/iptal/')
but the url stil like /hesabim/iptal/#modal-id
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
