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

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)