File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 64, in get_source
raise TemplateNotFound(template)
TemplateNotFound: hello.html
сценарий app.py:ошибка TemplateNotFound: hello.html из колбы
from flask import Flask
from flask import request
from flask import render_template
APP = Flask(_name__)
@APP.route('/')
def hello():
return render_template('hello.html')
if _name__ == '_main__':
APP.debug=True
APP.run()
Моя структура каталогов:
app/
├── app.py
├── app.py~
├── static
│ └── style.css
└── template
├── hello.html
└── hello.html~
Просто отслеживающий нам не говорит абсолютно ничего. Какой код вы используете? Где находятся файлы? Как выглядит ваш каталог? –
сценарий app.py: из опоки импорта Колба из запроса импорта колба из колба импорта render_template APP = Колба (_name__) @ APP.route ('/') Защиту привет() : возвращение render_template ('hello.html') если _name__ == '_main__': APP.debug = True APP.run() И hello.html:
<мета кодировок = "UTF-8" />Итак, где находится 'app.py'? Где находится файл 'hello.html'? –