hello guys
I’m totally new to Django, I need to pass the id of my record through the url that will call the form that will delete the record, how can I do that?, and how do I get this id to pass to the deletion procedure?
{% for usuario in usuarios %}
{{usuario.nome}}
{{usuario.sobrenome}}
{{usuario.usuario}}
{{usuario.senha}}
{% endfor %}
<div class="modal-content">
<form action="{% url 'deletaUsuario' usuario.id %}" method="POST">
{% csrf_token %}
<div class="modal-header">
<h4 class="modal-title">Deletar Usuário</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<p>Tem certeza que deseja deletar esse registro?</p>
<p class="text-warning"><small>Essa ação não poderá ser desfeita.</small></p>
</div>
<div class="modal-footer">
<input type="button" class="btn btn-default" data-dismiss="modal" value="Cancelar">
<input type="submit" class="btn btn-danger" value="Deletar">
</div>
</form>
</div>
</div>