#NEWLINE# @ permission_required ( 'core.manage_shop' ) #NEWLINE# def save_criteria( request , id ) : #NEWLINE# #INDENT# '\n    Saves the criteria for the customer tax with given id. The criteria are\n    passed via request body.\n    ' #NEWLINE# customer_tax = get_object_or_404 ( CustomerTax , pk = id ) #NEWLINE# customer_tax . save_criteria ( request ) #NEWLINE# html = [ [ '#criteria' , criteria ( request , customer_tax ) ] ] #NEWLINE# result = json . dumps ( { #NEWLINE# #INDENT# 'html' : html , #NEWLINE# 'message' : _ ( 'Criteria have been changed.' ) , #NEWLINE# #UNINDENT# } , cls = LazyEncoder ) #NEWLINE# return HttpResponse ( request , content_type = 'application/json' )