Home | Trees | Indices | Help |
|
---|
|
1 """Test module for the @-decorator syntax, which is version-specific""" 2 3 from cherrypy import expose, tools 4 from cherrypy._cpcompat import ntob8 9 @expose 12 13 @expose() 16 17 @expose("call_alias") 20 21 @expose(["alias1", "alias2"]) 24 25 @expose(alias="alias3")2831 32 @expose 33 @tools.response_headers(headers=[('Content-Type', 'application/data')])4035 yield ntob("blah")36 # This is here to demonstrate that _cp_config = {...} overwrites 37 # the _cp_config attribute added by the Tool decorator. You have 38 # to write _cp_config[k] = v or _cp_config.update(...) instead. 39 blah._cp_config['response.stream'] = True
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 1 05:09:40 2014 | http://epydoc.sourceforge.net |