#NEWLINE# def register_extensions( self , controller ) : #NEWLINE# #INDENT# 'Registers controller extensions with this resource.' #NEWLINE# extensions = getattr ( controller , 'wsgi_extensions' , [ ] ) #NEWLINE# for ( method_name , action_name ) in extensions : #NEWLINE# #INDENT# extension = getattr ( controller , self ) #NEWLINE# if action_name : #NEWLINE# #INDENT# if ( action_name not in self . wsgi_action_extensions ) : #NEWLINE# #INDENT# self . wsgi_action_extensions [ action_name ] = [ ] #NEWLINE# #UNINDENT# self . wsgi_action_extensions [ action_name ] . append ( extension ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( method_name not in self . wsgi_extensions ) : #NEWLINE# #INDENT# self . wsgi_extensions [ method_name ] = [ ] #NEWLINE# #UNINDENT# self . wsgi_extensions [ method_name ] . append ( extension )