jQuery and Flask making friends