[Zope] Calling zsql from a page template
Michael Bernstein
webmaven@lvcm.com
Sat, 19 Jul 2003 10:39:28 -0700
Roy S. Rapoport wrote:
> [snip]
> zsql_movienames is a zsql method returning simply a 'Name' column and
> requiring no arguments. I'm calling it thus:
> [snip]
> <tr tal:repeat="item zsql_movienames">
> [snip]
>
> But I'm getting
> Error Type: KeyError
> Error Value: zsql_movienames
>
> Any pointers to a doc that will cover what I'm trying to do? This is as
> elementary as it gets ...
The problem is simply that you must specify *where* the object will be
found. Page templates know about the following starting points:
root
here
container
template
request
user
modules
In your case, you probably want to use either here/zsql_movienames or
container/zsql_movienames as the path to your method, assuming it's in
the same folder as your template.
- Michael Bernstein