Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: appengine/findit/base_handler.py

Issue 1833833002: [Findit] Modify build_failure to prepare for new UI. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@0314-result-page
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import json 6 import json
7 import logging 7 import logging
8 import os 8 import os
9 9
10 from google.appengine.api import users 10 from google.appengine.api import users
11 import jinja2 11 import jinja2
12 import webapp2 12 import webapp2
13 13
14 from handlers import result_status
stgao 2016/03/28 23:29:26 It seems we could revert the change in this CL.
chanli 2016/03/29 01:35:56 Done.
15
14 16
15 JINJA_ENVIRONMENT = jinja2.Environment( 17 JINJA_ENVIRONMENT = jinja2.Environment(
16 loader=jinja2.FileSystemLoader( 18 loader=jinja2.FileSystemLoader(
17 os.path.join(os.path.dirname(__file__), 'templates')), 19 os.path.join(os.path.dirname(__file__), 'templates')),
18 extensions=['jinja2.ext.autoescape'], 20 extensions=['jinja2.ext.autoescape'],
19 autoescape=True) 21 autoescape=True)
20 22
21 23
22 def ToJson(data): 24 def ToJson(data):
23 return json.dumps(data) 25 return json.dumps(data)
24 26
25
26 JINJA_ENVIRONMENT.filters['tojson'] = ToJson 27 JINJA_ENVIRONMENT.filters['tojson'] = ToJson
27 28
28 29
29 class Permission(object): 30 class Permission(object):
30 ADMIN = 0 31 ADMIN = 0
31 CORP_USER = 8 32 CORP_USER = 8
32 ANYONE = 16 33 ANYONE = 16
33 34
34 35
35 class BaseHandler(webapp2.RequestHandler): 36 class BaseHandler(webapp2.RequestHandler):
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 return_code = 500 178 return_code = 500
178 cache_expiry = None 179 cache_expiry = None
179 180
180 self._SendResponse(template, data, return_code, cache_expiry) 181 self._SendResponse(template, data, return_code, cache_expiry)
181 182
182 def get(self): 183 def get(self):
183 self._Handle(self.HandleGet) 184 self._Handle(self.HandleGet)
184 185
185 def post(self): 186 def post(self):
186 self._Handle(self.HandlePost) 187 self._Handle(self.HandlePost)
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/handlers/build_failure.py » ('j') | appengine/findit/handlers/build_failure.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698