#NEWLINE# def calculate_relateds( ) : #NEWLINE# #INDENT# _prime_linksearch_tbl ( include_recommended_done = True ) #NEWLINE# links = Link . objects . filter ( related_links_calculated = False ) #NEWLINE# for link in links : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# populate_related_link ( link . id ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# link . related_links_calculated = True #NEWLINE# link . save ( )