1
플라스크를 사용하고 내 html 파일을 표시하려하지만 항상 404가 표시됩니다. 내 html 파일은 이미 내 템플릿 폴더 안에 있습니다.왜 render_template에서 404를 찾을 수 없습니까?
projectfolder/
app.py
templates/
frontend.html
이 코드입니다 : :이 아래의 프로젝트 구조
import sys
sys.path.append('C:\Users\Software\Anaconda2\Lib\site-packages')
from flask import Flask, render_template
app = Flask(__name__)
if __name__ == "__main__":
app.run(debug=True)
@app.route('/')
def home():
return render_template('frontend.html')
와우, 작동했습니다! 정말 고맙습니다! – user1234567890