

def delete(request):
    if request.user.is_anonymous():
        return redirect('/login/')
    blast = get_object_or_404(Blast, pk=request.POST.get('id', ''))
    if (blast.user == request.user):
        blast.delete()
    return redirect(('/%s/' % request.user))

dataset/ETHPy150Open simonw/bugle_project/bugle_project/bugle/views.py delete/original