Skip to content

Commit

Permalink
[1] Refine README; [2] Use default setting when run the app
Browse files Browse the repository at this point in the history
  • Loading branch information
XD-DENG committed Jul 1, 2017
1 parent 94a1a85 commit 3d5f4e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/
Expand Down
7 changes: 1 addition & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ def FUN_private():
else:
return abort(401)





@app.route("/admin/")
def FUN_admin():
if session.get("current_user", None) == "ADMIN":
Expand Down Expand Up @@ -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)

0 comments on commit 3d5f4e4

Please sign in to comment.