Вот моя структура папок:
Код: Выделить всё
oshinosensei/
├── static/
│ ├── Lorem.jpg
│ ├── Ipsum.jpg
│ ├── ...
├── templates/
│ ├── index.html
│ ├── result.html
└── app.py
Код: Выделить всё
jinja2.exceptions.TemplateNotFound: index.html
Код: Выделить всё
import os
print("Current working directory:", os.getcwd())
Код: Выделить всё
Current working directory: C:\Users\남경천\oshinosensei
Код: Выделить всё
import os
from flask import Flask, render_template, request
app = Flask(__name__, template_folder='templates')
@app.route("/")
def index():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)
Любая помощь или предложения о том, как решить эту проблему, будем очень признательны!
Подробнее здесь: https://stackoverflow.com/questions/792 ... -structure
Мобильная версия