-1
I’m on my first project in Django and I’m having a hard time making a confirmed modal before deleting the record. When I press the YES button it does not direct to my URL {% url 'apiDelete' api.id %}
. If you can shed some light on where I’m going wrong, I’d appreciate it!
{% for api in apis %}
<ta>
<tr class="gradeX">
<td class="center">{{ api.nome_erp_verbose }}</td>
<td>{{ api.descricao }}</td><!--
<td>{{ api.app_key }}</td>
<td>{{ api.app_secret }}</td> -->
<td class="taskOptions">
<a href="{% url 'apiUpdate' api.id %}" class="tip-top" data-original-title="Editar"><i class="icon-ok"></i></a>
<a href="#myAlert" class="tip-top" data-toggle="modal" data-original-title="Excluir"><i class="icon-remove"></i></a>
<div id="myAlert" class="modal hide">
<div class="modal-header">
<button data-dismiss="modal" class="close" type="button">×</button>
<h3>Atenção!</h3>
</div>
<div class="modal-body">
<p>Esta operação é irreversível. Excluir ?</p>
</div>
<div class="modal-footer">
<a data-dismiss="modal" class="btn" href="{% url 'apiDelete' api.id %}">Sim</a>
<a data-dismiss="modal" class="btn" href="#">Não</a>
</div>
</div>
</td>
</tr>
</tbody>