def METHOD_NAME(request, rule_id):
    """Controller for deleting threshold rules"""
    if request.method == 'POST':
        rule = get_object_or_404(ThresholdRule, pk=rule_id)
        rule.delete()
    return redirect('threshold-index')