Oh ,opss.........

who delete the _SQLAlchemyQuery in source ???
I merge my source to lastest , and find _SQLAlchemyQuery is lost ............
so there is a error............

-class _SQLAlchemyQuery(object):
-
-    """Iterable that allows to get slices from an SQLAlchemy Query object."""
-
-    def __init__(self, obj):
-        self.obj = obj
-
-    def __getitem__(self, range):
-        if not isinstance(range, slice):
-            raise Exception, "__getitem__ without slicing not supported"
-        return self.obj[range]
-
-    def __len__(self):
-        return self.obj.count()



On Mon, Apr 7, 2008 at 1:40 PM, ZhangShen Peng(Uestc graduating...)
<[EMAIL PROTECTED]> wrote:
>     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
>



-- 
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 [email protected]
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