Reload map template on form submit

This commit is contained in:
coolneng 2020-06-15 20:49:10 +02:00
parent f15ff39090
commit b442532768
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ from flask_bootstrap import Bootstrap
app = Flask(__name__) app = Flask(__name__)
app.secret_key = SECRET_KEY app.secret_key = SECRET_KEY
app.config['TEMPLATES_AUTO_RELOAD'] = True
bootstrap = Bootstrap(app) bootstrap = Bootstrap(app)
from app import errors, routes from app import errors, routes

View File

@ -28,7 +28,7 @@ def visualization():
@app.route("/map") @app.route("/map")
def map(): def map():
return render_template("map.html", title="Map") return render_template("map.html")
@app.route("/photos") @app.route("/photos")

View File

@ -8,7 +8,7 @@
{{ table|safe }} {{ table|safe }}
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<iframe class="map", src="/map" width="350" height="350"></iframe> <iframe id="map", src="/map" width="350" height="350"></iframe>
</div> </div>
</div> </div>
<p><a href="{{ url_for('data') }}">Back</a></p> <p><a href="{{ url_for('data') }}">Back</a></p>