Author: croberts
Date: 2012-05-02 20:11:33 +0000 (Wed, 02 May 2012)
New Revision: 5357
Modified:
trunk/cumin/python/cumin/qmfadapter.py
trunk/wooly/python/wooly/datatable.py
trunk/wooly/python/wooly/table.py
Log:
For BZ 802698, now applying max_qmf_table_sort only to QMF tables (Limits) and leaving sql
tables (submisstions) alone since they are sorted by postgres.
Modified: trunk/cumin/python/cumin/qmfadapter.py
===================================================================
--- trunk/cumin/python/cumin/qmfadapter.py 2012-05-02 15:48:47 UTC (rev 5356)
+++ trunk/cumin/python/cumin/qmfadapter.py 2012-05-02 20:11:33 UTC (rev 5357)
@@ -112,6 +112,9 @@
page = rows[first_index:last_index]
return page
+
+ def get_sort_limit(self):
+ return self.max_sortable_records
class ObjectQmfAdapter(QmfAdapter):
def __init__(self, app, cls):
Modified: trunk/wooly/python/wooly/datatable.py
===================================================================
--- trunk/wooly/python/wooly/datatable.py 2012-05-02 15:48:47 UTC (rev 5356)
+++ trunk/wooly/python/wooly/datatable.py 2012-05-02 20:11:33 UTC (rev 5357)
@@ -18,6 +18,9 @@
def get_count(self):
pass
+ def get_sort_limit(self):
+ return None
+
def get_data(self, values, options):
return ()
Modified: trunk/wooly/python/wooly/table.py
===================================================================
--- trunk/wooly/python/wooly/table.py 2012-05-02 15:48:47 UTC (rev 5356)
+++ trunk/wooly/python/wooly/table.py 2012-05-02 20:11:33 UTC (rev 5357)
@@ -214,7 +214,7 @@
self.static_tmpl = WidgetTemplate(self, "static_html")
def do_render(self, session, *args):
- if self.parent.static_header or self.table.count.get(session) >
self.app.max_qmf_table_sort:
+ if self.parent.static_header or (self.table.adapter.get_sort_limit() is not None
and self.table.count.get(session) > self.table.adapter.get_sort_limit()):
writer = Writer()
self.static_tmpl.render(writer, session)
return writer.to_string()
Show replies by date