Initial Commit
This commit is contained in:
17
app.py
Normal file
17
app.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from flask import Flask, render_template, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
def index():
|
||||
if request.method == "POST":
|
||||
# getting input with name = fname in HTML form
|
||||
instring = request.form.get("instring")
|
||||
outstring = instring.replace(" ", "-")
|
||||
return outstring
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
1
procfile
Normal file
1
procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
|
||||
7
requirments.txt
Normal file
7
requirments.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
click==8.0.3
|
||||
colorama==0.4.4
|
||||
Flask==2.0.2
|
||||
itsdangerous==2.0.1
|
||||
Jinja2==3.0.2
|
||||
MarkupSafe==2.0.1
|
||||
Werkzeug==2.0.2
|
||||
14
templates/index.html
Normal file
14
templates/index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> -->
|
||||
<meta charset="UTF-8">
|
||||
<title>Space Replace</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="" method="post">
|
||||
<input type="text" id="instring" name="instring"><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user