Python Forum

Full Version: Python wsgi example: problem with javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Snippsat, again, thank you.
Will try out all you said and check the examples.
Keep you posted.

Regards
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'] }}
Snippsat, again thank you. The example with with interaction between javascript has been particularly invaluable.

Cheers!!!
Pages: 1 2