[Zope] python script returning a 'rendered' zpt
Peter Bengtsson
peter at fry-it.com
Thu Mar 6 20:04:57 EST 2008
rendered_html = context.some_page_template(context, somevariable='foobar')
But then you need to write the page template as:
<div tal:contents="options/somevariable"> blah </div>
On 07/03/2008, David Bear <david.bear at asu.edu> wrote:
> I need to right a script that will return a zpt. However, I need the script to
> feed the zpt some values and then have zope returned the rendered zpt.
>
> I hope this is possible.
>
> For example, lets say I have something like this in a zpt
>
> <div tal:contents="somevariable"> blah </div>
>
> My python script with have something like this:
>
> somevariable = "this is a test"
>
> How can I get the script to returned the 'rendered' zpt?
>
> --
>
> David Bear
> College of Public Programs/ASU
> 411 N Central, Phoenix, AZ 85004
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
More information about the Zope
mailing list