I was going back through the Wiki 20 tutorial and found a couple quick
fixes I believe necessary.
Using TG2 RC1...
1. Under the heading "Hey, where’s the page?"
raise tg.redirect("notfound", pagename = pagename)
tg was never imported, so...
Should be changed to:
raise redirect("notfound", pagename = pagename)
2. Under the heading "Hey, where’s the page?"
@expose("wiki20.templates.pagelist")
def pagelist(self):
pages = [page.pagename for page in
DBSession.query(Page).order_by(pagelist)]
return dict(pages=pages)
Should be changed to:
pages = [page.pagename for page in
DBSession.query(Page).order_by(Page.pagename)]
OR
pages = [page.pagename for page in
DBSession.query(Page).order_by('pagename')]
Still new to TG2, so take my suggestions like a grain of salt. :)
Rodney
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---