-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
60 lines (40 loc) · 1.47 KB
/
main.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
55
56
57
58
59
60
import logging
import os
import webapp2
import jinja2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/index.html').render({}))
class AboutPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/about.html').render({}))
class AlumniPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/alumni.html').render({}))
class DonatePage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/donate.html').render({}))
class ExecPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/exec.html').render({}))
class JoinPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/join.html').render({}))
class TournamentsPage(webapp2.RequestHandler):
def get(self):
self.response.write(jenv.get_template('layout/tournaments.html').render({}))
jenv = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=['jinja2.ext.autoescape'],
autoescape=True
)
app = webapp2.WSGIApplication([
('/', MainPage),
('/index.html', MainPage),
('/about.html', AboutPage),
('/alumni.html', AlumniPage),
('/donate.html', DonatePage),
('/exec.html', ExecPage),
('/join.html', JoinPage),
('/tournaments.html', TournamentsPage),
])