durusmail: quixote-users: re: Quixote/Simpletal tal:repeat
re: Quixote/Simpletal tal:repeat
2004-10-06
Re: Quixote/Simpletal tal:repeat
re: Quixote/Simpletal tal:repeat
Amos Latteier
2004-10-06
c5qb-3fe3 at spamex.com wrote:
 >I'm using quixote with the quixote_tal.py module.  It appears that the
 >tal:repeat statement requires a callable expression, rather than just a
 >sequence:
 >
 >tal:repeat="image self/images"
 >
 >works if images is a function returning a list, but not if images is
 >itself a
 >list. If images is a list itself, then i'll get an error.  The error
 >manifests
 >itself as multiple redirects of the url in question with slashes
 >appended each
 >time until the browser reaches the redirection limit.

This is a weird error, I agree. I'll see if I can improve it. However,
what you are trying to do is not allowed. quixote_tal.py only allows
legal quixote URLs in path expressions. If you try to access your images
object in your webbrowser you'll see that it doesn't work.

There is a workaround. You can use a python expression to access
arbitrary object attributes, even ones that aren't available through the
web (and thus as path expressions). Try this:

   tal:repeat="python:self.images"

Good luck!

-Amos

reply