[Zope] newbie: ZTP, SQL, plone

andrew cooke andrew at acooke.org
Sun Oct 26 09:27:43 EST 2003


for the record, the (or, at least, a) solution is:

    <ul tal:repeat="item root/Plone/timesheets/sql/list_people">
     <li tal:content="item/person">name</li>
    </ul>

cheers,
andrew

andrew cooke said:

>
> hi,
>
> maybe i'm being trying too much too soon, but i'd appreciate help with the
> following (i'm new to zope but have used python for years and have some
> experience with jsp and similar web tech).
>
> i am using plone with postgresql.  the DA is working.  my problems are, i
> think related to ZTP and how to structure applications.
>
> i have the folder "timesheets" defined inside my root folder.  as two
> subfolders i have "sql" and "ztp"
>
> in /timesheets/sql are two SQL methods: add_person and list_people.  the
> SQL method /timesheets/sql/list_people returns a list of people from a
> table.  this works (the "test" button produces results; the column name is
> "person").
>
> but how do i get that data displayed in the ZTP page?  i have a page in
> the /timesheets/ztp folder (also called "list_people") with the following
> text, but it won't compile:
>
>     <ul tal:repeat="item /timesheets/sql/list_people">
>      <li tal:content="item/person">name</li>
>     </ul>
>
> the error message is: Compilation failed
> TAL.TALDefs.TALError: Invalid variable name "" in expression
> '/timesheets/sql/list_people'
>
> my problem seems to be accessing the sql method that is
> "../sql/list_people" relative to the location of the ztp page.  how i do
> this?  or is the problem elsewhere?
>
> apologies if i've done soemthing very stupid!
> cheers,
> andrew
>
> --
> http://www.acooke.org/andrew
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>


-- 
http://www.acooke.org/andrew



More information about the Zope mailing list