#NEWLINE# def forms_invalid( self , form , formsets ) : #NEWLINE# #INDENT# if ( self . creating and self . object and ( self . object . pk is not None ) ) : #NEWLINE# #INDENT# self . object . delete ( ) #NEWLINE# self . object = None #NEWLINE# #UNINDENT# messages . error ( self . request , _ ( 'Your submitted data was not valid - please correct the errors below' ) ) #NEWLINE# ctx = self . get_context_data ( form = form , ** formsets ) #NEWLINE# return self . render_to_response ( ctx )