On Sun, Oct 11, 2009 at 11:48 AM, gazza <[email protected]> wrote: > > Hello, > > I am seeing a problem when attempting to use the paginator. > > records= meta.Session.query(model.A).filter(mddel.A.tag==id) > > c.paginator = paginate.Page( > records, > page=int(request.params.get('page',1)), > items_per_page =2, > ) > > I am seeing the error: > > Sorry yor collection type is not supported by the paginate module, You > can either provide a list, a tuple, and SQLAlchemy 0.4 select object > etc. > > The line its complaining on is "items_per_page".
When an error occurs in a multi-line statement, Python might list any of the lines in the statement. I agree that it looks right. For now I'd just append .all() and see if that works as a workaround. Two other possibilities are that you're using an older version of WebHelpers than you think you are, or a different 'records' object. If the interactive traceback is working, you can type 'records' and see what type it is. You can also try to create a Page object right there and see what it will accept. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
