[Zope-dev] adding a ZSQLmethod programmaticaly throug the WEB

Steve Spicklemire steve@spvi.com
Wed, 8 Aug 2001 05:16:24 -0500


Sorry.. I should be more clear!

The "object" you want is the Product ZSQLMethods. Try this (url is an=20
URL to a *Folder*)

     object=3DZPublisher.Client.Object(url +=20
'/manage_addProduct/ZSQLMethods', username=3Duser, password=3Dpassword)

and then:

     call(object.manage_addZSQLMethod, id=3Dname, title=3D'',=20
connection_id=3D'testDB', arguments=3D'', template=3Dopen(f,'rb').read())

-steve

On Wednesday, August 8, 2001, at 01:46 AM, Joachim Schmitz wrote:

> Hi,
>
> I resend this quesstion with a little better re-line, and hopefully =
some
> better explanation.
>
> I try to add a ZSQLmethod by means of a modified load_site.py from the
> utilities directory of the Zopedistribution.
>
> it has a upload_html procedure with the line:
>
>    call(object.manage_addDTMLMethod, id=3Droot, file=3Df)
>
> which uses the ZClient.py to call the URL:
>
> http://www.myhost.de/manage_addDTMLMethod
>
> and submit the parameters in the post. this one works.
>
> I created an upload_sql: with the corresponding call:
>
>     call(object.manage_addZSQLMethod
>                            ,submit=3D"Add"
> 	                   ,id =3D root
> 	                   ,template=3Dtemplate
> 			   ,title=3D""
> 			   ,connection_id=3Dstring.strip(dbcon)
> 			   ,arguments=3Dparams)
>
> but thisone always fails with a "Not found error" for
>
> http://www.myhost.de/manage_addZSQLMethod
>
> So what is the correct path to the manage_addZSQLMethod ?
>
> I am quite sure, that the name is correct
>
>
> Mit freundlichen Gr=FC=DFen
>
> Joachim Schmitz
>
> AixtraWare, Ing. B=FCro f=FCr Internetanwendungen
> H=FCsgenstr. 33a, D-52457 Aldenhoven
> Telefon: +49-2464-8851, FAX: +49-2464-905163
>
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )