jinja2.exceptions.TemplateNotFound hatası

Şunu denermisiniz:

 from flask import Flask,render_template
 
 app = Flask(__name__,template_folder="templates")
 @app.route("/")
 def index():
     return render_template("index.html")
 
 if __name__ == "__main__":
     app.run(debug=True)

ve templates adında bir klasör oluşturun ve içine index.html dosyasını atın.
Flask galiba html dosyaları için templates klasörüne ihtiyaç duyuyor.

2 Beğeni