Re: [Zope] Rendering DTML from PythonScript
<color><param>0100,0100,0100</param>On 21 Mar 2001, Joel Burton wrote:
My exact Python script is called 'faculty':
"""Grab the path and get the faculty body."""
context.facbody(context, context.REQUEST, facid=traverse_subpath[0])
My exact DTML script is 'facbody':
<<dtml-var standard_html_header>
You were looking for &dtml-facid;
<<dtml-var standard_html_footer>
When I call facbody?facid=foo (test case), I get the expected 'You were
looking for foo'
When I call faculty/foo, I get a response with Content-Length: 0.
Any ideas what is going on?
Your Python script doesn't return anything, so nothing is sent back to the user (except an empty response). Try this: return </color>context.facbody(context, context.REQUEST, facid=traverse_subpath[0]) <nofill> -- Duncan Booth duncan@rcp.co.uk
On Wed, 21 Mar 2001, Duncan Booth wrote:
Your Python script doesn't return anything, so nothing is sent back to the user (except an empty response). Try this:
return </color>context.facbody(context, context.REQUEST, facid=traverse_subpath[0])
Yep. Mom always said that if I'd forget my head if it weren't attached to my body. This was the exact problem, and, not surprising, once I returned the value, I saw the right response. :-) Thanks! -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
participants (2)
-
Duncan Booth -
Joel Burton