-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
41 lines (28 loc) · 1.04 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
40
41
"""This app.py file will contain the backend for the dynamic web applications"""
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route("/")
def nav_bar():
"""Will display the navbar.html file"""
return render_template("navBar.html")
@app.route("/pageOne")
def page_one():
"""Will Display pageOne.html"""
return render_template("pageOne.html")
@app.route("/pageTwo")
def page_two():
"""Will displaye pageTwo.html"""
return render_template("pageTwo.html")
@app.route("/pageTwo/submit", methods=["POST"])
def page_two_submit():
"""This is the submit page where it renders the users input"""
user_input = request.get_data("user_input")
return render_template("navBar.html") + f"Your input was: {user_input}"
@app.route("/pageThree")
def page_three():
"""Will display pageThree.html"""
return render_template("pageThree.html")
@app.route("/pageThree/class")
def page_three_student():
"""Will show the student side of the application"""
return render_template("class.html")