Python Forum
Python wsgi example: problem with javascript
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python wsgi example: problem with javascript
#12
As a example can change zoom value on map.
So when start now it's on zoom 6 and not zoom 2.
from flask import Flask,render_template,request

app = Flask(__name__)
@app.route('/')
def open_layer():
    zoom = {'val': '6'}   
    return render_template("index.html", zoom=zoom)

if __name__ == '__main__':
   app.run(debug=True)
In index.html:
zoom: {{ zoom['val'] }}
Reply


Messages In This Thread
RE: Python wsgi example: problem with javascript - by snippsat - Jun-16-2017, 01:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Python request without selenium on html form with javascript onclick submit but eraosa 0 3,338 Jan-09-2021, 06:08 PM
Last Post: eraosa
  WSGI Multi processing. simbha 1 2,945 May-05-2020, 10:34 AM
Last Post: pyzyx3qwerty
  question about using javascript on python selenium Kai 1 2,008 Apr-12-2020, 04:28 AM
Last Post: Larz60+
  wsgi server ports chrisdb 3 3,490 Feb-26-2020, 04:24 PM
Last Post: snippsat
  How can get url from JavaScript in Selenium (Python 3)? m0ntecr1st0 3 4,329 Feb-19-2019, 12:35 AM
Last Post: m0ntecr1st0
  Log WSGI directly to stdout ThomasT 4 4,081 Jan-24-2019, 10:17 AM
Last Post: ThomasT
  Python - Scrapy Javascript Pagination (next_page) Baggelhsk95 3 10,255 Oct-08-2018, 01:20 PM
Last Post: stranac
  Trouble deploying Django (project folder, wsgi.py and libapache2-mod-wsgi) Drone4four 8 8,251 Mar-17-2018, 09:40 PM
Last Post: Drone4four

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020