C : Create
R : Read
U : Update
D : Delete
views.py
에 delete 함수를 만들어준다.def delete(request, id):
delete_blog = Blog.objects.get(id=id)
delete_blog.delete()
return redirect('home')
path('delete/<int:id>', m.delete, name="delete"),
<a href="{% url 'delete' blog.id %}">삭제하기</a>