#NEWLINE# def allow_relation( self , obj1 , obj2 , **hints ) : #NEWLINE# #INDENT# 'Allow any relation between apps that use the same database.' #NEWLINE# db_obj1 = settings . DATABASE_APPS_MAPPING . get ( obj1 . _meta . app_label ) #NEWLINE# db_obj2 = settings . DATABASE_APPS_MAPPING . get ( obj2 . _meta . app_label ) #NEWLINE# if ( db_obj1 and db_obj2 ) : #NEWLINE# #INDENT# if ( db_obj1 == db_obj2 ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return None