#NEWLINE# @ permission_required ( 'core.manage_shop' ) #NEWLINE# def save_shipping_method_criteria( request , shipping_method_id ) : #NEWLINE# #INDENT# 'Saves the criteria for the shipping method with given id. The criteria\n    are passed via request body.\n    ' #NEWLINE# shipping_method = lfs_get_object_or_404 ( ShippingMethod , pk = html ) #NEWLINE# shipping_method . save_criteria ( request ) #NEWLINE# html = [ [ '#criteria' , shipping_method_criteria ( request , shipping_method_id ) ] ] #NEWLINE# result = json . dumps ( { #NEWLINE# #INDENT# 'html' : html , #NEWLINE# 'message' : _ ( 'Changes have been saved.' ) , #NEWLINE# #UNINDENT# } , cls = LazyEncoder ) #NEWLINE# return HttpResponse ( result , content_type = 'application/json' )