1seok2

add 404 route

...@@ -13,6 +13,11 @@ from flask import Flask, render_template ...@@ -13,6 +13,11 @@ from flask import Flask, render_template
13 app = Flask(__name__) 13 app = Flask(__name__)
14 14
15 15
16 +@app.errorhandler(404)
17 +def page_not_found():
18 + return render_template('404.html')
19 +
20 +
16 @app.route("/") 21 @app.route("/")
17 def home(): 22 def home():
18 return render_template('index.html') 23 return render_template('index.html')
......
1 +<!DOCTYPE html>
2 +<html>
3 +<body>
4 + <h1>404 not found</h1>
5 +</body>
6 +</html>
...\ No newline at end of file ...\ No newline at end of file