#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# cell = self . cell . resolve ( context ) #NEWLINE# ctx = { #NEWLINE# #INDENT# 'cell' : cell , #NEWLINE# 'left' : ( cell . x * 86 ) , #NEWLINE# 'top' : ( context . y * 86 ) , #NEWLINE# #UNINDENT# } #NEWLINE# template = { #NEWLINE# #INDENT# EmptyCell : '_map_empty_cell.html' , #NEWLINE# Settlement : '_map_settlement.html' , #NEWLINE# SettlementBuilding : '_map_building.html' , #NEWLINE# SettlementTerrain : '_map_terrain.html' , #NEWLINE# #UNINDENT# } [ type ( cell ) ] #NEWLINE# if isinstance ( cell , EmptyCell ) : #NEWLINE# #INDENT# ctx [ 'create_url' ] = cell . create_url ( ) #NEWLINE# #UNINDENT# return render_to_string ( ( 'manoria/%s' % template ) , ctx )