-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyflask.py
35 lines (26 loc) · 1.04 KB
/
pyflask.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
#------------------------------------------------------------------
# Developer ----- Bryce Martin
# Description --- This program will get me familiar with using
# python and flask for web applications. I will
# use this framework to create a minimal starting
# for any web application.
#------------------------------------------------------------------
#importing flask object from flask library
#render template will import am html file into our function
#the html files must be stored in a folder called 'templates'
from flask import Flask, render_template
# creating an instance '__name__" = "__main__"
app = Flask(__name__)
#this / means the homepage: this line is the url
@app.route('/')
#this function will map its contents to the @app.route
def home():
return render_template("home.html")
@app.route('/about/')
def about():
return render_template("about.html")
@app.route('/contact/')
def contact():
return render_template("contact.html")
if __name__=="__main__":
app.run(debug=True)