diff options
| author | zhang <zch921005@126.com> | 2022-05-21 14:23:49 +0800 |
|---|---|---|
| committer | zhang <zch921005@126.com> | 2022-05-21 14:23:49 +0800 |
| commit | 678fab50280b647d95213a9695d07c49542696f2 (patch) | |
| tree | 74ca60de14311a8a2ff58dbf82d9b7574c9cd3ef /web | |
| parent | 2180c68999eb8dc0c7bcec015b2703f5b8b20223 (diff) | |
0521
Diffstat (limited to 'web')
| -rw-r--r-- | web/flask_proj/app.py | 14 | ||||
| -rw-r--r-- | web/flask_proj/templates/index.html | 20 | ||||
| -rw-r--r-- | web/html_basics.html | 10 |
3 files changed, 44 insertions, 0 deletions
diff --git a/web/flask_proj/app.py b/web/flask_proj/app.py new file mode 100644 index 0000000..2c3abb8 --- /dev/null +++ b/web/flask_proj/app.py @@ -0,0 +1,14 @@ +from flask import Flask, render_template + +app = Flask(__name__) + + +@app.route('/') +@app.route('/home') +def home(): + # return "<h1 style='color: blue;'> hello world! </h1>" + return render_template('index.html') + + +if __name__ == '__main__': + app.run(debug=True, port=5001) diff --git a/web/flask_proj/templates/index.html b/web/flask_proj/templates/index.html new file mode 100644 index 0000000..b9be263 --- /dev/null +++ b/web/flask_proj/templates/index.html @@ -0,0 +1,20 @@ +<!DOCUTYPE html> +<html> +<head> + +</head> +<body> + <form> + <table> + <tr> + <td> Name: </td> + <td> <input type="text" name="" placeholder="name"></td> + </tr> + <tr> + <td> Password: </td> + <td> <input type="password" name="" placeholder="password"> </td> + </tr> + </table> + </form> +</body> +</html> diff --git a/web/html_basics.html b/web/html_basics.html new file mode 100644 index 0000000..08b5577 --- /dev/null +++ b/web/html_basics.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <head> + <body> + + <p style="color: red"> hello world! </p> + + </body> + </head> +</html>
\ No newline at end of file |
