[Zope-dev] Use Z SQL methon in projects

R33t reet79 at ggs.ch
Sat Mar 27 12:35:34 EST 2004


Dear list,

I'm quite new to zope and I have to develop a Newsletter system as a
project for my university.
All works pretty good so far, I'm using ZPT with embedded Z SQL methods
to create my page dynamically....the code looks like this:
...
<b>Newsletters</b><br>
<table cellpadding="5" cellspacing="0" border="1" width="250">
 <tr tal:repeat="newsletters here/getNewsletters">
  <td align="left"><font size="2">
   <input type="checkbox" name="newsletter" tal:attributes="value
newsletters/id">
   <p tal:replace="newsletters/newsletter_name">NewsletterName</p>
  </td>
  </tr> 
 </table>
...
I did all the things so far inside the Zope ZMI to see how things work
together, but now I'd like to create a "real" project and I already got
most of the things working, like calling the page templates from within
python. The problem I have now is that I don't know how to manage to
export my Z SQL method getNewsletters to my product folder and register
it to Zope from within python when my product gets installed, so that
the template can call this method like before...I don't want the users
of my product to manually create this Z SQL method when they install the
newsletter system. Is it possible at all or do I have to start all over
again?

any help would be appreciated

thanks a lot
reet




More information about the Zope-Dev mailing list