커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4-2 localhost:5000 에서 mypage가 뜨지 않습니다.
undefined주차
북마크
김*수
댓글
6
추천
0
조회수
17
조회수
17
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


localhost:5000까지는 되는데 뒤에 mypage를 넣으면 안됩니다. 404 Not Found 가 뜨네요

제가 검색을 해서 @app.route('/mapage')를

@app.route("/mypage", methods=["GET"]) 으로 바꾸어봤지만 여전히 안됩니다. 이유를 모르겠네요 ...


Not Found

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.






from flask import Flask

app = Flask(__name__)


@app.route('/')

def home():

  return 'This is my Home!'

  

@app.route('/mapage')

def mypage():

  return '<button>버튼입니다</button>'


if __name__ == '__main__'

  app.run('0.0.0.0',port=5000,debug=True)




취소
 공유
취소
댓글 0
댓글 알림
나의얼굴