@permission_required("core.manage_shop")
def save_discount_criteria(request, id):
    discount = lfs_get_object_or_404(Discount, pk=id)
    discount.save_criteria(request)

    html = [["#criteria", discount_criteria(request, id)]]

    result = json.dumps({
        "html": html,
        "message": _("Changes have been saved."),
    }, cls=LazyEncoder)

    return HttpResponse(result, content_type='application/json')
Saves the criteria for the discount with given id. The criteria
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/discounts/views.py/save_discount_criteria