-
Notifications
You must be signed in to change notification settings - Fork 6
/
app.py
39 lines (32 loc) · 1.21 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from flask import Flask, request, render_template, sessions, redirect
app = Flask(__name__)
@app.route('/', methods=['GET'])
def index():
return render_template("index.html")
@app.route('/registration', methods=['GET', 'POST'])
def send():
if request.method == 'POST':
fname = request.form['fname']
lname = request.form['lname']
usn = request.form['usn']
email = request.form['email']
number = request.form['number']
year = request.form['year']
branch = request.form['branch']
x= [fname, lname, usn, email, number, year, branch]
# user = {
# 'fname': fname,
# 'lname': lname,
# 'usn': usn,
# 'email': email,
# 'number': number,
# 'year': year,
# 'branch': branch
# }
# comented this render_templete sice there was a difficulty in comming back from the confirm.html to index.html
#return render_template("confirm.html", lst= x)
elif request.method == 'GET':
return render_template("registration.html")
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)