#NEWLINE# @ register . simple_tag #NEWLINE# def render_block_from_file( from_file , blockname ) : #NEWLINE# #INDENT# from cactus.templatetags import SITE as site #NEWLINE# for p in site . pages ( ) : #NEWLINE# #INDENT# if ( p . path == '{0}.html' . format ( from_file ) ) : #NEWLINE# #INDENT# ( tpl , ctx ) = p . gen_template_and_context ( ) #NEWLINE# for node in tpl : #NEWLINE# #INDENT# for subnode in _get_nodelist_recursive ( node ) : #NEWLINE# #INDENT# if ( getattr ( subnode , 'name' , '' ) == blockname ) : #NEWLINE# #INDENT# return subnode . render ( ctx ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ''