#NEWLINE# @ permission_required ( 'core.manage_shop' ) #NEWLINE# def add_customer_tax( request , template_name = 'manage/customer_tax/add_customer_tax.html' ) : #NEWLINE# #INDENT# 'Provides a form to add a new customer tax.\n    ' #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# form = CustomerTaxForm ( data = request . POST , files = request . FILES ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# tax = form . save ( ) #NEWLINE# return lfs . core . utils . set_message_cookie ( url = reverse ( 'lfs_manage_customer_tax' , kwargs = { #NEWLINE# #INDENT# 'id' : tax . id , #NEWLINE# #UNINDENT# } ) , msg = _ ( 'Customer tax has been added.' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = CustomerTaxForm ( ) #NEWLINE# #UNINDENT# return render_to_response ( template_name , RequestContext ( request , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# 'customer_taxes' : CustomerTax . objects . all ( ) , #NEWLINE# 'next' : ( request . POST if ( request . method == 'POST' ) else request . GET ) . get ( 'next' , request . META . get ( 'HTTP_REFERER' ) ) , #NEWLINE# #UNINDENT# } ) )