[ZPT] ZSQL and ZPT
Chris Keyes
chrisk@nipltd.com
Wed, 10 Oct 2001 18:02:47 +0100
Just found this, which I guess answers my question
Date: Sat, 14 Jul 2001 13:58:19 -0400
From: Chris Curvey <ccurvey@bellatlantic.net>
Reply-To: chris@chriscurvey.com
X-Mailer: Mozilla 4.77 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: zpt@zope.org
Subject: Re: [ZPT] set ZSQL attributes from ZPT
References: <3B5070B3.9BED153@bellatlantic.net>
<001c01c10c8f$77dca4d0$2a00a8c0@evansys>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: zpt-admin@zope.org
Errors-To: zpt-admin@zope.org
X-BeenThere: zpt@zope.org
X-Mailman-Version: 2.0.5 (101270)
Precedence: bulk
List-Help: <mailto:zpt-request@zope.org?subject=help>
List-Post: <mailto:zpt@zope.org>
List-Subscribe: <http://lists.zope.org/mailman/listinfo/zpt>,
<mailto:zpt-request@zope.org?subject=subscribe>
List-Id: Zope Presentation Templates <zpt.zope.org>
List-Unsubscribe: <http://lists.zope.org/mailman/listinfo/zpt>,
<mailto:zpt-request@zope.org?subject=unsubscribe>
List-Archive: <http://lists.zope.org/pipermail/zpt/>
Thanks Evan. After some digging, I found the solution (I think, posted by
you) somewhere on zope.org. For anyone else, here's the solution.
<table>
<tr>
<th>Table Name</th>
</tr>
<tbody tal:repeat="stuff python:here.test_sql_method(paramFoo='S')">
<tr>
<td tal:content="stuff/name">Query Result Goes Here</td>
</tr>
</tbody>
</table>
Evan Simpson wrote:
> From: "Chris Curvey" <ccurvey@bellatlantic.net>
> > But what if test_sql_method is defined to take a parameter? How can I
> > set the value of the attribute from within my ZPT page?
>
> Anything that requires explicit parameters, including DTML, ZSQL, and
> Scripts, must be called from a Python expression.
>
> Cheers,
>
> Evan @ digicool
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
--
Chris Curvey
Curvey Consulting
http://www.chriscurvey.com