Skip to content

Instantly share code, notes, and snippets.

@huseyinozsoy
Last active March 6, 2020 21:11
Show Gist options
  • Save huseyinozsoy/0ef6c39a025ee5fd0ca7b8c76a9ed793 to your computer and use it in GitHub Desktop.
Save huseyinozsoy/0ef6c39a025ee5fd0ca7b8c76a9ed793 to your computer and use it in GitHub Desktop.
app.py Get Post
from flask import Flask,render_template,request,redirect
app = Flask(__name__)
@app.route('/',methods=["GET","POST"])
def index():
if request.method == "GET":
return render_template("index.html")
if request.method == "POST":
name = request.form.get("name")
return render_template("profile.html",name=name)
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment