반응형
파이썬 jinja2.exceptions.TemplateNotFound 오류 해결
TemplateNotFound(template)
rendering-templates 로 html파일을 불러오는 app.py 실행하려고 하니 TemplateNotFound(template) 오류가 나서 해결 방법을 찾아보았다.
rendering-templates 설명 링크 참조
https://flask.palletsprojects.com/en/0.12.x/quickstart/#rendering-templates
Quickstart — Flask Documentation (0.12.x)
For web applications it’s crucial to react to the data a client sends to the server. In Flask this information is provided by the global request object. If you have some experience with Python you might be wondering how that object can be global and how
flask.palletsprojects.com
app.py 파일 상위로 이동하기
폴더 구조에 따라서 templates 폴더 안에 있어도 html 파일을 인식하지 못하는 경우가 생길 수 있는 듯 하여 app.py 파일 위치를 상위로 이동했다.
TemplateNotFound(template) 해결 후 rendering-templates 구동
반응형
'넓은 IT 이야기' 카테고리의 다른 글
[jQuery + Javascript] 이메일 판별 함수 (특정 문자열 추출) (2) | 2022.01.25 |
---|---|
[jQuery + Javascript] 입력한 글자 alert 얼럿 띄우기 (0) | 2022.01.24 |
Python PYPI, 파이썬 비교연산자, 기본 조건문 (0) | 2022.01.09 |
Ajax로 환율 api 적용해 페이지 나타내기 (0) | 2022.01.03 |
Ajax 기본 사용 방법 & OpenAPI 이용해 실시간 값 가져오기 (0) | 2022.01.01 |