#NEWLINE# def assignUserElements( user ) : #NEWLINE# #INDENT# ranks = getattr ( settings , 'RANKS_NAMES_DATA' ) #NEWLINE# rank = '' #NEWLINE# if ranks : #NEWLINE# #INDENT# totalposts = ( user . ftopics_set . count ( ) + user . reply_set . count ( ) ) #NEWLINE# for el in ranks : #NEWLINE# #INDENT# if ( totalposts == el [ 0 ] ) : #NEWLINE# #INDENT# rank = el [ 1 ] #NEWLINE# #UNINDENT# #UNINDENT# if rank : #NEWLINE# #INDENT# userprofile = user . dinetteuserprofile #NEWLINE# userprofile . userrank = totalposts #NEWLINE# userprofile . last_posttime = datetime . now ( ) #NEWLINE# userprofile . save ( )