#NEWLINE# @ is_owner #NEWLINE# @ require_POST #NEWLINE# def delete_xform( request , username , id_string ) : #NEWLINE# #INDENT# xform = get_object_or_404 ( XForm , user__username__iexact = username , id_string__exact = id_string ) #NEWLINE# remove_xform ( xform ) #NEWLINE# audit = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# audit_log ( Actions . FORM_DELETED , request . user , xform . user , ( _ ( "Deleted form '%(id_string)s'." ) % { #NEWLINE# #INDENT# 'id_string' : xform . id_string , #NEWLINE# #UNINDENT# } ) , request , request ) #NEWLINE# return HttpResponseRedirect ( '/' )