aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruditgulati2020-09-06 15:52:08 -0500
committeruditgulati2020-11-01 06:47:02 -0600
commitf3351f698c7961aa28578b90fa0c73a2e14f864d (patch)
treee872ee006ce8ff78c047af50aafa93eff5f6f40f
parentaa2d7a45fca8c6503a5de6cec7ce58d248144b9d (diff)
downloadgenenetwork2-f3351f698c7961aa28578b90fa0c73a2e14f864d.tar.gz
change arguments for ServerSideTable class
-rw-r--r--wqflask/wqflask/server_side.py9
-rw-r--r--wqflask/wqflask/views.py7
2 files changed, 10 insertions, 6 deletions
diff --git a/wqflask/wqflask/server_side.py b/wqflask/wqflask/server_side.py
index d044d411..824b00aa 100644
--- a/wqflask/wqflask/server_side.py
+++ b/wqflask/wqflask/server_side.py
@@ -24,14 +24,13 @@ class ServerSideTable(object):
wqflask/wqflask/views.py for reference use.
'''
- def __init__(self, table_data, request_values):
+ def __init__(self, rows_count, table_rows, header_data_names, request_values):
self.request_values = request_values
self.sEcho = self.request_values['sEcho']
- self.table_data = table_data
- self.rows_count = self.table_data.rows_count
- self.table_rows = self.table_data.table_rows
- self.header_data_names = self.table_data.header_data_names
+ self.rows_count = rows_count
+ self.table_rows = table_rows
+ self.header_data_names = header_data_names
self.sort_rows()
self.paginate_rows()
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index f0b78188..63570815 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -922,7 +922,12 @@ def db_info_page():
def snp_browser_table():
logger.info(request.url)
snp_table_data = snp_browser.SnpBrowser(request.args)
- current_page = server_side.ServerSideTable(snp_table_data, request.args).get_page()
+ current_page = server_side.ServerSideTable(
+ snp_table_data.rows_count,
+ snp_table_data.table_rows,
+ snp_table_data.header_data_names,
+ request.args,
+ ).get_page()
return flask.jsonify(current_page)