#NEWLINE# def render( self , request ) : #NEWLINE# #INDENT# "\n        Render a given resource. See L{IResource}'s render method.\n\n        I delegate to methods of self with the form 'render_METHOD'\n        where METHOD is the HTTP that was used to make the\n        request. Examples: render_GET, render_HEAD, render_POST, and\n        so on. Generally you should implement those methods instead of\n        overriding this one.\n\n        render_METHOD methods are expected to return a string which\n        will be the rendered page, unless the return value is\n        twisted.web.server.NOT_DONE_YET, in which case it is this\n        class's responsibility to write the results to\n        request.write(data), then call request.finish().\n\n        Old code that overrides render() directly is likewise expected\n        to return a string or NOT_DONE_YET.\n        " #NEWLINE# m = getattr ( self , ( 'render_' + request . method ) , None ) #NEWLINE# if ( not m ) : #NEWLINE# #INDENT# from twisted.web.error import UnsupportedMethod #NEWLINE# allowedMethods = ( getattr ( self , 'allowedMethods' , 0 ) or _computeAllowedMethods ( self ) ) #NEWLINE# raise UnsupportedMethod ( allowedMethods ) #NEWLINE# #UNINDENT# return m ( m )