Do I need the confirm_delete.html template inorder to use the _delete template?

Here is my error: django.template.exceptions.TemplateDoesNotExist: blog/post_confirm_delete.html

this is the url in mu urls.py file path('post/<int:pk>/delete/', BlogDeleteView.as_view(), name='post_delete'),

Here is my views.py code:

class BlogDeleteView(DeleteView):
    model = Post
    template = "post_delete.html"
    success_url =  reverse_lazy('home')

Even when I do make the post_confirm_delete.html template, nothing changes.

Back to Top