#NEWLINE# @ receiver ( post_save , sender = ModelWithFK ) #NEWLINE# @ disable_synchro_log #NEWLINE# def update_visits( sender , instance , created , **kwargs ) : #NEWLINE# #INDENT# 'Update parent visits.' #NEWLINE# if ( not created ) : #NEWLINE# #INDENT# instance . link . visits -= instance . _prev . visits #NEWLINE# instance . link . save ( ) #NEWLINE# #UNINDENT# instance . link . visits += instance . visits #NEWLINE# instance . link . save ( )