#NEWLINE# def update( self , **kw ) : #NEWLINE# #INDENT# "\n        Shortcut for doing an UPDATE on this object.\n\n        If _signal=False is in ``kw`` the post_save signal won't be sent.\n        " #NEWLINE# signal = kw . pop ( '_signal' , True ) #NEWLINE# cls = self . __class__ #NEWLINE# for ( k , v ) in kw . items ( ) : #NEWLINE# #INDENT# setattr ( self , k , v ) #NEWLINE# #UNINDENT# if self : #NEWLINE# #INDENT# attrs = dict ( self . __dict__ ) #NEWLINE# models . signals . pre_save . send ( sender = cls , instance = self ) #NEWLINE# for ( k , v ) in self . __dict__ . items ( ) : #NEWLINE# #INDENT# if ( attrs [ k ] != v ) : #NEWLINE# #INDENT# kw [ k ] = v #NEWLINE# setattr ( self , k , v ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# objects = cls . get_unfiltered_manager ( ) #NEWLINE# objects . filter ( pk = self . pk ) . update ( ** kw ) #NEWLINE# if signal : #NEWLINE# #INDENT# models . signals . post_save . send ( sender = cls , instance = self , created = False )