views.py 2.35 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

### EVENTS ###

48 49 50 51 52
@website.route('/events/')
def events():
    return render_template("events.html",
        renderHead = True,
    )
53

54 55 56 57 58
@website.route('/events/openhatch15/')
def openhatch15():
    return render_template("events/openhatch15.html",
        renderHead = False,
    )
59

60 61
### DOCUMENTS ###

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

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

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


Daniel W Bond's avatar
Daniel W Bond committed
81
@website.route('/documents/privacy_policy/')
82 83
def privacyPolicy():
    return render_template("documents/privacy_policy.html",
84
        renderHead = True,
85 86
    )

Daniel W Bond's avatar
Daniel W Bond committed
87
@website.route('/documents/software_freedom/')
88 89
def softwareFreedom():
    return render_template("documents/software_freedom.html",
90
        renderHead = True,
91 92
    )

Daniel W Bond's avatar
Daniel W Bond committed
93
@website.route('/documents/terms_of_service/')
94 95
def termsOfService():
    return render_template("documents/terms_of_service.html",
96
        renderHead = True,
97 98
    )

Daniel W Bond's avatar
Daniel W Bond committed
99
@website.route('/documents/usage_policy/')
100 101
def usagePolicy():
    return render_template("documents/usage_policy.html",
102
        renderHead = True,
103
    )
Daniel W Bond's avatar
404  
Daniel W Bond committed
104 105 106 107 108

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