I am trying to pass data as JSON from a Flask route to a Jinja template rendering JavaScript.  I want to iterate over the data using JavaScript.  The browser shows SyntaxError: Unexpected token '&'. Expected a property name. when JSON.p...
I want to display my CPU usage dynamically.  I don't want to reload the page to see a new value.  I know how to get the CPU usage in Python.  Right now I render a template with the value.  How can I continually update a page with a value from F...
I need to send data through XmlHttpRequest from JavaScript to Python server. Because I'm using localhost, I need to use CORS. I'm using the Flask framework and its module flask_cors.  As JavaScript I have this:      var xmlhttp;     if (win...
I looked at similar forums but was not able to get any of the solutions to work. I am trying to pass variables from Flask to my JavaScript file. These values then will be used for PubNub from my JavaScript file.   Here is part of my Python code:   @a...
I am kind of new to Python, but I have had the same issue working with Node apps. I am making a pretty standard jQuery AJAX request to my local Python sever:  init: function(callback) {             var token = _config.get_token();              $.ajax...
I'm having troubles getting a Flask/Python variable passed to Javascript.   Basically, I'm importing from MySQL and have tried rendering the return in three different ways.    (43.8934276, -103.3690243), (47.052060, -91.639868), (45.1118, -95...
Does anyone know how to serve an Angular single page application using Flask?  I'm having trouble serving the default route, '/', which should load index.html and the associated components. Here's my Flask function:  @app.route('/...
I need the config variables in javascript in my flask application. Currently, I access the config variables via:  @app.route('/api/getconfigs/') def get_config_variable():     return config['VARIABLENAME']   Is this the only way to ge...
I have some very basic code that acts as a loading gif for a webpage:  The loading and content containers sit in my base template. The     //header  <a href="{{ url_for('welcome', id=id, profile=profile) }}" onclick="spinner();...
i'm trying to create something like Google Suggest Tool (via suggest api http://suggestqueries.google.com/complete/search?output=toolbar&hl=ru&q=query )   I'm listening input changes, and send data go GET:   $("#search_form_input&...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.