I have this code
book_model_delete = {
'model' : Book,
'post_delete_redirect': "/boo/list/",
"template_name" : "books/confirm_delete.html",
}
(r'^book/delete/(?P<object_id>\d+)/$', create_update.delete_object, book_model_delete)
The template i am using is
<form action="/book/delete/{{object_id}}/" method="post" enctype="multipart/form-data" >
{% csrf_token %}
Are you sure you want to delete
<p><input type="submit" value="yes" /></p>
</form>
Now when i click on delete then this confirmation page comes but i don’t know how to get the object_id passed in URL in this template
You are probably looking for
{{object.id}}: