From 0f42027bc9b4ea2b966dde2c937702f335b7d74f Mon Sep 17 00:00:00 2001 From: deepti Date: Tue, 2 Jul 2013 17:52:00 +0530 Subject: [PATCH] Updating --- templates/form.html | 7 +++++++ templates/form1.html | 10 ++++++++++ test3.py | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 templates/New Text Document.html create mode 100644 templates/form.html create mode 100644 templates/form1.html create mode 100644 test3.py diff --git a/templates/New Text Document.html b/templates/New Text Document.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/form.html b/templates/form.html new file mode 100644 index 0000000..76ceb65 --- /dev/null +++ b/templates/form.html @@ -0,0 +1,7 @@ + + + + +
FirstName
LastNAme
+ + \ No newline at end of file diff --git a/templates/form1.html b/templates/form1.html new file mode 100644 index 0000000..a7a4da7 --- /dev/null +++ b/templates/form1.html @@ -0,0 +1,10 @@ + + + + +
+FName
+LName
+
+ + \ No newline at end of file diff --git a/test3.py b/test3.py new file mode 100644 index 0000000..3ea0666 --- /dev/null +++ b/test3.py @@ -0,0 +1,16 @@ +from flask import Flask +from flask import render_template +from flask import request +app = Flask(__name__) + +@app.route("/add",methods=['GET','POST']) +def hello1(): + if request.method=='GET': + return render_template("form1.html") + elif request.method=='POST': + print request.form + return "OK" + +#syntax +if __name__ == "__main__": + app.run() \ No newline at end of file -- 1.7.10.4