By clicking <a href...>delete</a>, you will receive a GET request, and your delete_entry method will respond only with POST.
You need to either: 1. replace the link to the form and submit the button or 2. send the link to the hidden form using JavaScript.
Here's how to do 1:
<form action="/delete/{{ entry.id }}" method="post">
<input type="submit" value="Delete />
</form>
Here's how to do 2 (using jQuery):
$(document).ready(function() {
$("a.delete").click(function() {
var form = $('<form action="/delete/' + this.dataset.id + '" method="post"></form>');
form.submit();
});
});
...
<a href="#delete" class="delete" data-id="{{ entry.id }}">Delete</a>
, , - delete_entry GET. GET ( ). .