[Zope-dev] tal:define for a dictionary of dictionaries

Anton Hughes Anton.Hughes@utas.edu.au
Fri, 6 Sep 2002 17:01:07 +1000


Further to my earlier question about creating a dictionary of dictionaries
(which is working now - thanks very much!), I am now doing the ZPT to draw
it. But I'm not sure how to make this d-o-d, which is returned by a
PythonScript in the same directory, available. This is what I have so far:

<table border="1" width="100%">
  <tr>
    <th>Time</th>
    <th align="center" tal:repeat="resource container/resources">
     <div tal:content="resource/name">Resource</div>
    </th>
  </tr>
  <tr tal:repeat="slot container/timeslots">
    <td align="center" tal:content="slot/slot_name">#</td>
    <td align="center" tal:repeat="resource container/resources">
     <div>***</div>
    </td>
  </tr>
</table>

(resources and timeslots are ZSQLMethods)

*** this is where I want 'bookings[slot/slot_name][resources/name]' to
return a person's name (or not).

The PythonScript accepts one parameter (a date) and is called
render_bookings.

Can someone please get me that final 5% of the way there?

Thanks
Anton