<DIV>OK, I perhaps don't have been clear in my previous e-mail. </DIV>
<DIV>I need to write a little site using ZOPE3 as i using ZOPE2.</DIV>
<DIV>Really i've also write an application on ZOPE3 by ZMI (the same in ZOPE2). This application insert (by a form) values in a database written in MySQL. Typical use is composed by the following steps:</DIV>
<DIV> </DIV>
<DIV>1- a Page Template containing a form;</DIV>
<DIV>localhost:8080/Mercatino/iscrizione_form:</DIV>
<DIV><FONT size=2>
<P><EM><html></EM></P>
<P><EM><span </EM></P>
<P><EM>tal:replace="structure container/header"></EM></P>
<P><EM></span></EM></P>
<P><EM><body></EM></P>
<P><EM><h1> Iscrizione </h1></EM></P>
<P><EM><form <STRONG>action="../iscrizione/iscrizione_html"</STRONG> method="post"></EM></P>
<P><EM><table width="100%"></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> Nome:</td></EM></P>
<P><EM><td> <input type="text" name="nome" size=20></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> Cognome:</td></EM></P>
<P><EM><td> <input type="text" name="cognome" size=20></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> E-mail:</td></EM></P>
<P><EM><td> <input type="text" name="email" size=20></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> Telefono:</td></EM></P>
<P><EM><td> <input type="text" name="tel" size=20></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> User:</td></EM></P>
<P><EM><td> <input type="text" name="user" size=20></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><tr></EM></P>
<P><EM><td> Password:</td></EM></P>
<P><EM><td> <input type="text" name="password" size=10></td></EM></P>
<P><EM></tr></EM></P>
<P><EM><td colspan=2></EM></P>
<P><EM><input type="submit" value="Invia"></EM></P>
<P><EM></td></EM></P>
<P><EM></table></EM></P>
<P><EM></form></EM></P>
<P><EM></body></EM></P>
<P><EM></html> </EM></P>
<P> </P></FONT></DIV>
<DIV>2- Previous form call a new ZPT, iscrizione_html in localhost:8080/Mercatino/iscrizione_html. <BR></DIV><FONT size=2>
<P><EM><html></EM></P>
<P><EM><span </EM></P>
<P><EM>tal:replace="structure context/../header"></EM></P>
<P><EM></span></EM></P>
<P><EM><body></EM></P>
<P><EM><p tal:content="context/zope:title"></p></EM></P>
<P><EM><span tal:condition="request/nome | nothing"></EM></P>
<P><EM><span tal:condition="request/cognome | nothing"></EM></P>
<P><EM><span tal:condition="request/email | nothing"></EM></P>
<P><EM><span tal:condition="request/tel | nothing"></EM></P>
<P><EM><span tal:condition="request/user | nothing"></EM></P>
<P><EM><span tal:condition="request/password | nothing"></EM></P>
<P><EM><p tal:define="global nome request/form/nome"></p></EM></P>
<P><EM><p tal:define="global cognome request/form/cognome"></p></EM></P>
<P><EM><p tal:define="global email request/form/email"></p></EM></P>
<P><EM><p tal:define="global tel request/form/tel"></p></EM></P>
<P><EM><p tal:define="global user request/form/user"></p></EM></P>
<P><EM><p tal:define="global password request/form/password"></p></EM></P>
<P><EM><span tal:define="sql_conn string:utility_db"></EM></P>
<P><EM><span tal:repeat="a sql: INSERT INTO utenti VALUES ('${user}', '${password}')"></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:repeat="b sql: INSERT INTO anagrafica VALUES ('${user}', '${nome}', '${cognome}', '${email}', '${tel}')"></EM></P>
<P><EM></span></EM></P>
<P><EM><h2>Inserimento effettuato</h2></EM></P>
<P><EM><h2>Benvenuto <b tal:content="nome">nome</b> <b tal:content="cognome">cognome</b>!<br /> Sei identificato come <b tal:content="user">user</b> </h2></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/nome | nothing"></EM></P>
<P><EM><h3>Non hai inserito il nome</h3></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/cognome | nothing"></EM></P>
<P><EM><h3>Non hai inserito il cognome</h3></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/tel| nothing"></EM></P>
<P><EM><h3>Non hai inserito il telefono</h3></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/email | nothing"></EM></P>
<P><EM><h3>Non hai inserito la mail</h3></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/user | nothing"></EM></P>
<P><EM><h3>Non hai inserito la user</h3></EM></P>
<P><EM></span></EM></P>
<P><EM><span tal:condition="not:request/password | nothing"></EM></P>
<P><EM><h3>Non hai inserito la password</h3></EM></P>
<P><EM></span></EM></P>
<P><EM></EM> </P>
<P><EM><a href=../../iscrizione_form><button>Torna all'inserimento</button></a></EM></P>
<P><EM><br/><br/></EM></P>
<P><EM><a href=../../index.html><button>Torna alla home</button></a></EM></P>
<P><EM></body></EM></P>
<P><EM></html> </EM></P>
<DIV></FONT>This ZPT use the package sql expr (but i don't like presentation and logic in the same object...) for use a query. I use "sqlexpr" because i don't know how pass parameter to a ZSQL script (passing parameter to a ZSQL in ZOPE2 work perfectly, but in the damned ZOPE3 NO!!!). How i can pass parameters?</DIV>
<DIV> </DIV>
<DIV><STRONG></STRONG>3- <STRONG>THE REAL PROBLEM IS:</STRONG></DIV>
<DIV>In ZOPE2, if i want to use a PYTHON code, i insert a Python(script) into a folder and i call the script by using a ZPT (tal:repeat for example). In ZOPE2, NO PROBLEM but.....</DIV>
<DIV>In ZOPE3, I can't insert a Python script by the ZMI, but i need to write a package (__init__.py, python class, ZCML etc...). I need a lot of examples for:</DIV>
<DIV> a: write a package for my using and not like examples on zope.org</DIV>
<DIV> b: write the ZPT that call the package</DIV>
<DIV> c: acquisition doesn't work like ZOPE2</DIV>
<DIV> </DIV>
<DIV>Now I HOPE that i've been clear.</DIV>
<DIV>Thanks and sorry for my VERY VERY bad English<BR></DIV><B><I></I></B>
<DIV><B><I>Jean-Marc Orliaguet <jmo@ita.chalmers.se></I></B> ha scritto: </DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Wade Leftwich wrote:<BR><BR>> Stephan Richter wrote:<BR>><BR>>><BR>>><BR>>> Why not have those templates on the file system? Is there a need for<BR>>> users to modify those templates?<BR>><BR>><BR>> Yes, users with the job description "web producers", which is to say<BR>> people who can do HTML and a bit of scripting, but who do not get<BR>> access to the file system. Kind of like the Zope 2 model. We even use<BR>> acquisition.<BR>><BR>> Also, it seemed to me unwieldy to put 50 directories in the filesystem<BR>> to contain the templates for all the sites. But because of my<BR>> experience with Zope 2, I assumed TTW was the best way to customize<BR>> the application for each site, and I guess I should re-examine that<BR>> assumption.<BR>><BR>Hi!<BR>there is indeed such a category of users, i.e. somewhere
between<BR>filesystem developers and application users. There will be support for<BR>this kind of TTW editing in cpsskins (cf Custom Portlet), but it will be<BR>purely limited to "simple" presentation logic.<BR><BR>cf. http://www.z3lab.org/sections/front-page/design-features/custom-portlet<BR><BR>the difference with the Zope2 model I think is that "web producers" are<BR>not going to be ZPT programmers, but more like "site composers" with the<BR>ability to do minimal TTW template editing such as shown in the animation.<BR><BR>/JM<BR></BLOCKQUOTE><p>
                <hr size=1><font face="Arial" size="2"><a href="http://us.rd.yahoo.com/mail_it/taglines/*http://it.mail.yahoo.com"><b>Yahoo! Mail</b></a>: gratis 1GB per i messaggi, antispam, antivirus, POP3</font>