completed js flask sql - to do: ajax