Answer the question
In order to leave comments, you need to log in
How to auto "update" templates?
There is a code that outputs index.html:
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def main():
return render_template("index.html")
if __name__ == '__main__':
app.run()
Answer the question
In order to leave comments, you need to log in
This can only be done in debug mode, for this you need to pass the debug=True parameter to the run method . In production, this greatly reduces performance. It's better to configure the WSGI server to restart under certain conditions, and create those conditions on changes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question