diff --git a/app.py b/app.py index 7c76db9..c8955eb 100644 --- a/app.py +++ b/app.py @@ -43,8 +43,10 @@ def update_load(): while True: time.sleep(1) maprows = transaction_database.RunQuery() - # TODO remove - this is for testing only - shuffle(maprows) + # manipulate the data to proof that the push works + if len(maprows) > 0: + maprows[0]['pos'] = 1000 + round(time.time()) % 9000 + maprows[0]['errors_array'] = ["Account in use-12112:42","Account in use-12112:43"] # note: the push sends update to all subscribed clients turbo.push(turbo.replace(render_template('_table.html', transactions=maprows), 'datatable')) diff --git a/templates/_table.html b/templates/_table.html index fab5a80..a39f93d 100644 --- a/templates/_table.html +++ b/templates/_table.html @@ -21,8 +21,7 @@
+ + {{ error }} + + | +