[Zope] calling SQL methods from Scripts(Python)
Jim Penny
jpenny@universal-fasteners.com
Mon, 15 Jul 2002 10:49:32 -0400
On Sun, Jul 14, 2002 at 04:05:56PM -0700, Dennis Allison wrote:
>
> I thought they would behave as a variation on methods, but they don't
> seem to find the keyword parameters. For example, I have a query on
> a single key
>
> request = container.REQUEST
> RESPONSE = request.RESPONSE
> container.PhotoUpdate(context,request, user_id='STUD00001' )
> return 0
>
> where PhotoUpdate is a simple SQL query object. I thought
> the call would be the same as for a DTML-method, but I suspect
> now I am wrong. What's the correct form.
Drop the context. I know that you can use
container.PhotoUpdate(request),
and that you can use
container.PhotoUpdate( user_id='STUD00001' )
.
I have never tried to use both in combination, but I suspect that
container.PhotoUpdate(request, user_id='STUD00001' )
is fine.
Jim Penny
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>