AZMel wrote: > If I pass the results object to my template then the paginate fails: > > File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/ > turbogears/paginate.py", line 89, in decorated > raise 'Variable is not a list or SelectResults' > Variable is not a list or SelectResults
Unfortunately, I think that the SelectResults extension only works on "query" objects, and not arbitrary selects like I instructed you to use. So you are going to have to build a query object to do what you want, which is to fetch two different mapped objects in one query. The SQLAlchemy documentation provides some insight on how to do this (rather advanced) operation in its section on advanced data mapping: http://www.sqlalchemy.org/docs/ documentation.html#advdatamapping_resultset Personally, I have found limit/offset paging to work very poorly on large data sets, especially with high offsets. The problems with it are worsened if you use MySQL, which has a foolish implementation of offset where all records are pulled into memory, and then irrelevant ones are just thrown away. Good luck. -- Jonathan LaCour http://cleverdevil.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

