오류 회고) AssertionError: View function mapping is overwriting an existing endpoint function: home

jina Seo·2022년 7월 3일
0

왜 안될까

목록 보기
1/3

from flask import Flask
app = Flask(name)

@app.route('/')
def home():
return 'This is Home!'

@app.route('/mypage')
def home():
return 'This is Mypage!'

if name == 'main':
app.run('0.0.0.0',port=5000,debug=True)

플라스크로 서버 두 개만들다가 발생한 오류
AssertionError: View function mapping is overwriting an existing endpoint function: home
home이라는 함수를 두번 사용. 두 번째 home을 다르게 바꿔주면 됨. 복붙할때 유의 하기

profile
운동하는 개발자가 꿈입니다?

0개의 댓글