Am 28.04.2010 17:16 schrieb jose soares:
I have yet some troubles with paginate sorting.
It sorts a table with few rows, but it doesn't sort with many rows.
I'm trying it with 8105 rows.
@tg.paginate(dynamic_limit='limit',var_name='grid_params',
default_order='comune_nome', max_limit=None)
What's wrong with it?
Check help(paginate) or the detailed documentation available here:
http://docs.turbogears.org/1.0/PaginateDecorator
There is a limit of 1000 rows up to which paginate sorts in memory,
because sorting in memory can be time and memory consuming.
It is possible to increase this limit with the max_sort parameter, e.g.
@tg.paginate(max_sort=10000, ...)
But you should better check why paginate is sorting your data in memory
in the first place. If you pass a SQLAlchemy or SQLObject query, then
TurboGears will normally do the sorting in the database. So you're
probably passing a list instead of a query.
Btw, you can also add the following to your dev.cfg file for debugging
the paginate decorator:
[[[turbogears.paginate]]]
level='DEBUG'
Hope this helps,
-- Christoph
--
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.