I want to iterate the IterBetter object more than once for some
reasons, for example, I want to get the post tags in the archive:
class Tag:
def GET(self, id):
tag = app.model.tag.get_tag(id)
posts = app.model.posttag.get_posts(id)
tags = {}
for p in posts:
pid = p['id']
tags[pid] = app.model.posttag.get_tags(pid)
print conf.tpl_layout(conf.tpl_view.post.tag(posts, tag, tags,
is_logined()), subtitle='archives of '+tag.name or '')
Here I use "for p in posts: " to get the post id, and the template
will iterate the "posts" again. But I found that webpy just run a
blank area (related to posts display), and show no errors.
Do you have any suggestion? thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---