def feed(self,id,page):
        c.feed=Feed.query.filter_by(id=id).one()
        c.feeds=c.feed.site.feeds
        c.posts=c.feed.posts
        c.links=Page(c.posts,int(page),30).pager(link_var="page")
        return render("news/feed.htm")

oh ,thanks,now use like this is ok


On Mon, Apr 7, 2008 at 1:57 AM, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On Apr 4, 2008, at 10:51 PM, 张沈鹏(电子科大 毕/就业倒计时...) wrote:
>
>
> > from webhelpers.pagination import paginate,links
> >
> >   def feed(self,id,page):
> >       c.feed=Feed.query.filter_by(id=id).one()
> >       c.feeds=c.feed.site.feeds
> >       paginator,c.posts=paginate(c.feed.posts,int(page),30)
> >       c.links=links.pagelist(paginator.current)
> >       return render("news/feed.htm")
> >
>
>  I'd highly suggest using the new paginate, it has quite a bit of docs in
> the module, and creates a nicer pager as well.
>
>  Cheers,
>  Ben



-- 
Blog(Chinese Edition):
 http://zsp.javaeye.com/
Resume(Also Chinese):
 http://zsp007.com.cn/
Where graduate soon , where to go ......
Double major:
 Biomedical Engineering
 Computer Science
 -- Hierarch Zhang

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to