views.py 1.98 KB
Newer Older
Daniel W Bond's avatar
Daniel W Bond committed
1
from flask import render_template
Daniel W Bond's avatar
Daniel W Bond committed
2
from website import website
Daniel W Bond's avatar
Daniel W Bond committed
3

Daniel W Bond's avatar
Daniel W Bond committed
4
@website.route('/')
Daniel W Bond's avatar
Daniel W Bond committed
5 6
def index():
    return render_template("index.html",
7
        renderHead = False,
Daniel W Bond's avatar
Daniel W Bond committed
8
    )
Daniel W Bond's avatar
Daniel W Bond committed
9

Daniel W Bond's avatar
Daniel W Bond committed
10
@website.route('/calendar/')
Daniel W Bond's avatar
Daniel W Bond committed
11 12
def calendar():
    return render_template("calendar.html",
13
        renderHead = True,
Daniel W Bond's avatar
Daniel W Bond committed
14 15
    )

Daniel W Bond's avatar
Daniel W Bond committed
16
@website.route('/contact/')
Daniel W Bond's avatar
Daniel W Bond committed
17 18
def contact():
    return render_template("contact.html",
19
        renderHead = True,
Daniel W Bond's avatar
Daniel W Bond committed
20 21
    )

Daniel W Bond's avatar
Daniel W Bond committed
22
@website.route('/documents/')
Daniel W Bond's avatar
Daniel W Bond committed
23 24
def documents():
    return render_template("documents.html",
25
        renderHead = True,
Daniel W Bond's avatar
Daniel W Bond committed
26 27
    )

Daniel W Bond's avatar
Daniel W Bond committed
28
@website.route('/people/')
Daniel W Bond's avatar
Daniel W Bond committed
29 30
def people():
    return render_template("people.html",
31
        renderHead = True,
Daniel W Bond's avatar
Daniel W Bond committed
32 33
    )

Daniel W Bond's avatar
Daniel W Bond committed
34
@website.route('/projects/')
Daniel W Bond's avatar
Daniel W Bond committed
35 36
def projects():
    return render_template("projects.html",
37
       renderHead = True,
Daniel W Bond's avatar
Daniel W Bond committed
38
    )
39 40 41

### DOCUMENTS ###

Daniel W Bond's avatar
Daniel W Bond committed
42
@website.route('/documents/constitution/')
43 44
def constitution():
    return render_template("documents/constitution.html",
45
        renderHead = True,
46 47
    )

Daniel W Bond's avatar
Daniel W Bond committed
48
@website.route('/documents/intellectual_property/')
49 50
def intellectualProperty():
    return render_template("documents/intellectual_property.html",
51
        renderHead = True,
52 53
    )

Daniel W Bond's avatar
Daniel W Bond committed
54
@website.route('/documents/logos/')
55 56
def logos():
    return render_template("documents/logos.html",
57
        renderHead = True,
58 59 60
    )


Daniel W Bond's avatar
Daniel W Bond committed
61
@website.route('/documents/privacy_policy/')
62 63
def privacyPolicy():
    return render_template("documents/privacy_policy.html",
64
        renderHead = True,
65 66
    )

Daniel W Bond's avatar
Daniel W Bond committed
67
@website.route('/documents/software_freedom/')
68 69
def softwareFreedom():
    return render_template("documents/software_freedom.html",
70
        renderHead = True,
71 72
    )

Daniel W Bond's avatar
Daniel W Bond committed
73
@website.route('/documents/terms_of_service/')
74 75
def termsOfService():
    return render_template("documents/terms_of_service.html",
76
        renderHead = True,
77 78
    )

Daniel W Bond's avatar
Daniel W Bond committed
79
@website.route('/documents/usage_policy/')
80 81
def usagePolicy():
    return render_template("documents/usage_policy.html",
82
        renderHead = True,
83
    )
Daniel W Bond's avatar
404  
Daniel W Bond committed
84 85 86 87 88

# 404 error
@website.errorhandler(404)
def page_not_found(error):
    return render_template("404.html"), 404