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

Side by Side Diff: appengine/swarming/template.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 4 years, 7 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 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from components import template 7 from components import template
8 from server import config 8 from server import config
9 9
10 ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) 10 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
11 11
12 12
13 def bootstrap(): 13 def bootstrap():
14 template.bootstrap({'swarming': os.path.join(ROOT_DIR, 'templates')}) 14 template.bootstrap({'swarming': os.path.join(ROOT_DIR, 'templates')})
15 15
16 16
17 def render(name, params=None): 17 def render(name, params=None):
18 """Shorthand to render a template.""" 18 """Shorthand to render a template."""
19 out = { 19 out = {
20 'google_analytics': config.settings().google_analytics, 20 'google_analytics': config.settings().google_analytics,
21 } 21 }
22 out.update(params or {}) 22 out.update(params or {})
23 return template.render(name, out) 23 return template.render(name, out)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698