#NEWLINE# def save( self , * args , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# default_storage . delete ( self . sample_filename ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# models . Model . save ( self , * args , ** kwargs ) #NEWLINE# self . create_sample ( ) #NEWLINE# for size in self . photo_sizes . all ( ) : #NEWLINE# #INDENT# size . clear_cache ( ) #NEWLINE# #UNINDENT# for prop in [ prop for prop in dir ( self ) if ( prop [ ( - 8 ) : ] == '_related' ) ] : #NEWLINE# #INDENT# for obj in getattr ( self , prop ) . all ( ) : #NEWLINE# #INDENT# obj . clear_cache ( ) #NEWLINE# obj . pre_cache ( )