728x90
파이썬 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 구동

728x90
'Python' 카테고리의 다른 글
[Python] 파이썬 패키지 사용법 : import requests (0) | 2022.01.30 |
---|---|
[Python] 파이썬 자료형, 함수, 조건문, 반복문 (0) | 2022.01.29 |
[Python Crawling] 파이썬 음악 순위 크롤링(스크랩핑) (0) | 2022.01.28 |
Python 파이썬 beautifulsoup[bs4] 활용해 영화 순위 크롤링하기 (0) | 2022.01.27 |
Python PYPI, 파이썬 비교연산자, 기본 조건문 (0) | 2022.01.09 |
댓글