views.py 2.08 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",
Daniel W Bond's avatar
Daniel W Bond committed
37 38 39 40 41 42 43
        renderHead = True,
    )

@website.route('/opt-out/')
def optOut():
    return render_template("privacy_opt_out.html",
    
Daniel W Bond's avatar
Daniel W Bond committed
44
    )
45 46 47

### DOCUMENTS ###

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

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

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


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

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

Daniel W Bond's avatar
Daniel W Bond committed
79
@website.route('/documents/terms_of_service/')
80 81
def termsOfService():
    return render_template("documents/terms_of_service.html",
82
        renderHead = True,
83 84
    )

Daniel W Bond's avatar
Daniel W Bond committed
85
@website.route('/documents/usage_policy/')
86 87
def usagePolicy():
    return render_template("documents/usage_policy.html",
88
        renderHead = True,
89
    )
Daniel W Bond's avatar
404  
Daniel W Bond committed
90 91 92 93 94

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