def delete_post(request, id): post = Post.objects.get(id=id) Post.delete(post) return HttpResponseRedirect('/stream/')