diff options
| author | A Farzat <a@farzat.xyz> | 2025-08-15 19:03:44 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2025-08-15 19:03:44 +0300 |
| commit | 2e8162d46fcc8c9dcd8e9aa07f7e15fea0ba5183 (patch) | |
| tree | fbf4c09592f0e890c70707754e0b4986cb2ba846 /flask_app/src | |
| parent | 66402f492f017f58ccd2c7606dea35fac8d96e79 (diff) | |
| download | csca5028-2e8162d46fcc8c9dcd8e9aa07f7e15fea0ba5183.tar.gz csca5028-2e8162d46fcc8c9dcd8e9aa07f7e15fea0ba5183.zip | |
Initial Basic Web Application
Diffstat (limited to 'flask_app/src')
| -rw-r--r-- | flask_app/src/app.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/flask_app/src/app.py b/flask_app/src/app.py new file mode 100644 index 0000000..b3e955b --- /dev/null +++ b/flask_app/src/app.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +from flask import Flask, request + +app = Flask(__name__) + +@app.route("/") +def main(): + return ''' + <form action="/echo_user_input" method="POST"> + <input name="user_input"> + <input type="submit" value="Submit!"> + </form> + ''' + +@app.route("/echo_user_input", methods=["POST"]) +def echo_input(): + input_text = request.form.get("user_input", "") + return "You entered: " + input_text
\ No newline at end of file |
