#NEWLINE# def generate_random_codes( self ) : #NEWLINE# #INDENT# key = User . objects . make_random_password ( length = KEY_SIZE ) #NEWLINE# secret = User . objects . make_random_password ( length = SECRET_SIZE ) #NEWLINE# while self . filter ( key__exact = key , secret__exact = secret ) . count ( ) : #NEWLINE# #INDENT# secret = User . objects . make_random_password ( length = SECRET_SIZE ) #NEWLINE# #UNINDENT# return ( key , secret )