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()
|
||||
Reference in New Issue
Block a user