#NEWLINE# def render( self ) : #NEWLINE# #INDENT# '\n        Render the container and all its contained blocks.\n        ' #NEWLINE# ordered_blocks = self . container . blocks . select_subclasses ( ) #NEWLINE# tmpl = loader . select_template ( self . container . get_template_names ( ) ) #NEWLINE# rendered_blocks = [ ] #NEWLINE# for block in ordered_blocks : #NEWLINE# #INDENT# renderer = block . get_renderer_class ( ) ( block , self . context ) #NEWLINE# try : #NEWLINE# #INDENT# rendered_block = renderer . render ( ) #NEWLINE# #UNINDENT# except ImproperlyConfigured : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# rendered_blocks . append ( ( block , rendered_block ) ) #NEWLINE# #UNINDENT# self . context [ 'container' ] = self . container #NEWLINE# self . context [ 'rendered_blocks' ] = rendered_blocks #NEWLINE# self . context . update ( self . get_context_data ( ) ) #NEWLINE# return tmpl . render ( rendered_block . context )