#NEWLINE# def calculate_dependencies( self ) : #NEWLINE# #INDENT# '\n        Loads dependency info for this migration, and stores it in itself\n        and any other relevant migrations.\n        ' #NEWLINE# for migration in self . _get_dependency_objects ( 'depends_on' ) : #NEWLINE# #INDENT# self . dependencies . add ( migration ) #NEWLINE# migration . dependents . add ( self ) #NEWLINE# #UNINDENT# for migration in self . _get_dependency_objects ( 'needed_by' ) : #NEWLINE# #INDENT# self . dependents . add ( migration ) #NEWLINE# migration . dependencies . add ( self ) #NEWLINE# #UNINDENT# previous = self . previous ( ) #NEWLINE# if previous : #NEWLINE# #INDENT# self . dependencies . add ( previous ) #NEWLINE# previous . dependents . add ( self )