From 3d5f4e4c6b630072429655e55e4ff300a16f50fe Mon Sep 17 00:00:00 2001 From: XD-DENG Date: Sat, 1 Jul 2017 22:11:06 +0800 Subject: [PATCH] [1] Refine README; [2] Use default setting when run the app --- README.md | 11 ++++++++++- app.py | 7 +------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ba8def5..b71e3da 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,15 @@ The main purpose is to introduce how to implement the essential elements in web For more basic knowledge of Flask, you can refer to [a tutorial on Tutorialspoint](https://www.tutorialspoint.com/flask/). -## Details +## How to Run + +- Step 1: Make sure you have Python packages *flask*, *hashlib*, and *sqlite3* installed. + +- Step 2: Go to this app's directory and run `python app.py` + + + +## Details about This Toy App There are three tabs in this toy app @@ -33,6 +41,7 @@ There are three tabs in this toy app A few accounts were set for testing, like ***admin*** (password: admin), ***test_1*** (password: 123456), etc. You can also delete or add accounts after you log in as ***admin***. + ## References - http://flask.pocoo.org/ diff --git a/app.py b/app.py index eb904d8..7e49184 100644 --- a/app.py +++ b/app.py @@ -37,10 +37,6 @@ def FUN_private(): else: return abort(401) - - - - @app.route("/admin/") def FUN_admin(): if session.get("current_user", None) == "ADMIN": @@ -101,6 +97,5 @@ def FUN_add_user(): - if __name__ == "__main__": - app.run(debug=True, port = 9000, host="0.0.0.0") + app.run(debug=True)