Создаю класс на удаления, не работает в чем ошибка?
urlpatterns = [
path('', views.HomeListView.as_view(), name='home'),
path('detail/<int:pk>', views.HomeDetailView.as_view(), name='detail_page'),
path('edit-page', views.ArticleCreateView.as_view(), name='edit_page'),
path('update-page/<int:pk>', views.ArticleUpdateView.as_view(), name='update_page'),
path('delete-page/<int:pk>', views.ArticleDeleteView.as_view(), name='delete_page'),
class ArticleDeleteView(DeleteView):
model = Articles
template_name = 'edit_page.html'
success_url = reverse_lazy('edit_page')
{% for i in list_articles %}
<tr>
<th>{{i.id}}</th>
<td>{{i.create_date}}</td>
<td>{{i.name}}</td>
<td><a href="{% url 'update_page' i.id %}">редактировать</a></td>
<td>
<form id="delete_form" action="{% url 'delete_page' i.id %}"> method="post">{% csrf_token %}</form>
<a href="javascript:void()" onclick="delete_question">удалить</a>
<script>
function.delete_question() {
if (confirm("Вы уверены")) {
document.getElementById('delete_form').submit()
}
}
</script><img src="https://habrastorage.org/webt/5e/4e/8e/5e4e8e95c437a967120786.png" alt="image"/>