diff --git a/python_web/flasky/main.py b/python_web/flasky/main.py index 36895b1..094740f 100644 --- a/python_web/flasky/main.py +++ b/python_web/flasky/main.py @@ -10,7 +10,7 @@ @app.route('/') def index(): # 使用的默认路径是 ./templates/index.html - return render_template('index.html', name = 'Test Page') + return render_template('index.html', name = 'TestPage') @app.route('/user/') def user(name): @@ -18,6 +18,11 @@ def user(name): # 两边使用相同的变量名很常见,但不是强制要求 return render_template('user.html', name = name) +@app.route('/r404') +def r404(): + # 使用的默认路径是 ./templates/index.html + return render_template('404.html') + @app.errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 diff --git a/python_web/flasky/static/img/BG_A_Default.jpg b/python_web/flasky/static/img/BG_A_Default.jpg deleted file mode 100644 index b40a309..0000000 Binary files a/python_web/flasky/static/img/BG_A_Default.jpg and /dev/null differ diff --git a/python_web/flasky/static/img/backimg.png b/python_web/flasky/static/img/backimg.png new file mode 100644 index 0000000..e05bc82 Binary files /dev/null and b/python_web/flasky/static/img/backimg.png differ diff --git a/python_web/flasky/static/img/main.jpg b/python_web/flasky/static/img/main.jpg deleted file mode 100644 index 18b75ec..0000000 Binary files a/python_web/flasky/static/img/main.jpg and /dev/null differ diff --git a/python_web/flasky/templates/404.html b/python_web/flasky/templates/404.html index eb5475c..bc9698b 100644 --- a/python_web/flasky/templates/404.html +++ b/python_web/flasky/templates/404.html @@ -9,7 +9,7 @@ -

+

Create by Flasky


diff --git a/python_web/flasky/templates/index.html b/python_web/flasky/templates/index.html index 4662365..4b6ad66 100644 --- a/python_web/flasky/templates/index.html +++ b/python_web/flasky/templates/index.html @@ -5,12 +5,70 @@ Flasky测试 - + + - -

- Create by Flasky

+ +

+ Create by Flasky +

+
+