Skip to content
Newer
Older
100644 27 lines (18 sloc) 543 Bytes
5c8b15e @kamens initial commit
kamens authored Sep 12, 2011
1 import logging
2 import os
3
cc16ba6 @kamens Switch to entirely client-side rendering, remove any server-side temp…
kamens authored Oct 31, 2011
4 from google.appengine.ext.webapp import RequestHandler
5c8b15e @kamens initial commit
kamens authored Sep 12, 2011
5 from .config import can_control_experiments
6
7 class Dashboard(RequestHandler):
8
9 def get(self):
10
11 if not can_control_experiments():
12 self.redirect("/")
13 return
14
cc16ba6 @kamens Switch to entirely client-side rendering, remove any server-side temp…
kamens authored Nov 1, 2011
15 path = os.path.join(os.path.dirname(__file__), "templates/base.html")
16 f = None
5c8b15e @kamens initial commit
kamens authored Sep 12, 2011
17
cc16ba6 @kamens Switch to entirely client-side rendering, remove any server-side temp…
kamens authored Nov 1, 2011
18 try:
19 f = open(path, "r")
20 html = f.read()
21 finally:
22 if f:
23 f.close()
5c8b15e @kamens initial commit
kamens authored Sep 12, 2011
24
cc16ba6 @kamens Switch to entirely client-side rendering, remove any server-side temp…
kamens authored Nov 1, 2011
25 self.response.out.write(html)
5c8b15e @kamens initial commit
kamens authored Sep 12, 2011
26
Something went wrong with that request. Please try again.