Jeffrey schrieb:
> you can use webhelpers.paginate to do this.
> 
> i wrote a decoration to wrap it.
> you can use it like this:
> 
> @expose('xxxx.templates.book.home')
> @paginate('books')
> def home(self, **kw):
>     books_query = DBSession.query(Book)
>     return dict(page='home', books=books_query)
> 
> then 'books' in dict will be converted to a page object

All this is done for you in the @paginate-decorator tg ships with already.

Diez

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to