flask TemplateNotFound
조회수 505회
파이썬 플라스크로 템플릿을 로드하여 보여주는 프로그램을 만들었습니다.
import flask;
app = flask.Flask(__name__);
@app.route('/')
@app.route('/home')
def hello():
return flask.render_template('테스트.html')
app.run(debug=True);
그런데 7번째 줄에서 자꾸 파일을 찾지 못했다는 에러가 나고,
인터넷에서 본대로 html 이 들어있는 tenplates 폴더를 만들고,
빈 staytic 폴더까지 만들었으나 계속 jinja2.exceptions.TemplateNotFound
에러가 발생하였습니다.
아래는 폴더 구조입니다.
app
|----templates
테스트.html
|----staytic
empty
run.py
댓글 입력