Add kwargs to helloworld for debugging purposes
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2675
@cherrypy.expose
@cherrypy.tools.mako(filename="/helloworld.mako")
- def helloworld(self):
- return {}
- return "Hello world!\nYour request: "+repr(dir(cherrypy.request))
+ def helloworld(self, **kwargs):
+ return {'request': cherrypy.request, 'kwargs': kwargs}
helloworld._cp_config['tools.require_login.on'] = False
def pathSplit(path):
+<%page expression_filter="h"/>
<%inherit file="skeleton.mako" />
-Hello world!
+<p>Hello world!</p>
+
+<p>kwargs:</p>
+<pre style="white-space: pre-wrap">
+${repr(kwargs)}
+</pre>
+
+<p>Your request:</p>
+
+<pre style="white-space: pre-wrap">
+${repr(dir(request))}
+</pre>
<%def name="title()">
helloworld