#NEWLINE# def csrf_failure( request , reason = '' ) : #NEWLINE# #INDENT# if ( request . error_format == 'JSON' ) : #NEWLINE# #INDENT# return json_error ( ( 'CSRF Error: %s' % ( request , ) ) , status = 403 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return html_csrf_failure ( request , reason )