I am learning django. My URL pattern is like below.
path('task-delete/<int:pk>/', DeleteView.as_view(), name="tasks-delete"),
I have class based view like below.
class DeleteView(DeleteView):
model = Task
context_object_name = 'task'
success_url = reverse_lazy('tasks')
HTML code in template is like below.
<a href="{% url 'task-delete' task.pk %}">Delete</a>
My error is like below.
How to fix this error ?