Home:ALL Converter>How to make javascript work with python on Flask?

How to make javascript work with python on Flask?

Ask Time:2013-08-25T09:20:45         Author:Pedro Alves

Json Formatter

i'm trying to build a dynamic list on Flask. Everyone who loads the page will see this list and can add or remove items from it. If something is added or removed, everybody receives this update.

I'm using Javascript to do some local processing on the list's items and Python to store it (in a singleton way) on the Flask server.

I want to have sure that there is consistency between items on python's list object and what javascript shows on the page, so i think the best option is make it read items from the python's list.

How can i make Javascript read items in this Python's list?

Author:Pedro Alves,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/18424758/how-to-make-javascript-work-with-python-on-flask
yy