Written by
flask-style
on
on
4주차 -flask html파일주기
4주차 -flask html파일주기
정해진 폴더 구조가 있음
app.py = 서버 만드는데 기본
static = css,이미지 파일들 담아둠
templates = html 파일들을 담아둠
from flask import Flask, render_template //render_template를 사용해서 연결
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html') //render_template 안의 index.html코드가 서버에 그려짐
from http://endpot66.tistory.com/21 by ccl(S) rewrite - 2021-10-14 00:00:30