views.py 2.19 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
    )

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

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

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

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

@website.route('/opt-out/')
def optOut():
    return render_template("privacy_opt_out.html",
48

Daniel W Bond's avatar
Daniel W Bond committed
49
    )
50 51 52

### DOCUMENTS ###

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

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

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


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

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

Daniel W Bond's avatar
Daniel W Bond committed
84
@website.route('/documents/terms_of_service/')
85 86
def termsOfService():
    return render_template("documents/terms_of_service.html",
87
        renderHead = True,
88 89
    )

Daniel W Bond's avatar
Daniel W Bond committed
90
@website.route('/documents/usage_policy/')
91 92
def usagePolicy():
    return render_template("documents/usage_policy.html",
93
        renderHead = True,
94
    )
Daniel W Bond's avatar
404  
Daniel W Bond committed
95 96 97 98 99

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