#NEWLINE# def getDigraphString( filename ) : #NEWLINE# #INDENT# 'Extracts necessary information to draw Digraph from template' #NEWLINE# with open ( filename , 'r' ) as template : #NEWLINE# #INDENT# content = template . read ( ) #NEWLINE# #UNINDENT# extends = re . search ( '{% extends "(.*)" %' , content ) #NEWLINE# if ( extends is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# extended = filename [ ( filename . find ( 'templates' ) + 10 ) : ] #NEWLINE# return ( ( ( ( ( ( '"' + extended ) + '"' ) + ' -> ' ) + '"' ) + extends . group ( 1 ) ) + '"' )