-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
54 lines (42 loc) · 1.13 KB
/
__init__.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
42
43
44
45
46
47
48
49
50
51
52
53
54
# Austin Wong-Parker
# Flask Website main program
from flask import Flask, render_template, redirect, url_for
app = Flask(__name__) # app is an instance of the flask class.
@app.route('/') # route decorator tells flask which URL to go through.
def home():
try:
return render_template('home.html')
except Exception:
return str(e)
@app.route('/projects')
def projects():
return render_template('projects.html')
@app.route('/education')
def education():
return render_template('education.html')
@app.route('/contact')
def contact():
return redirect('https://www.linkedin.com/in/a-w-p/')
@app.route('/howto')
def howto():
return render_template('howto.html')
@app.route('/blog')
def links():
return render_template('blog.html')
@app.route('/gaming')
def gaming():
return render_template('gaming.html')
'''
@app.route('/test')
def test():
return render_template("home.html")
'''
'''
# Error handler
@app.errorhandler(404)
def page_not_found:
return make_response(render_template("404.html"), 404)
'''
if __name__ == "__main__":
app.run()
#app.run(debug=True) # uncomment for debugging