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

Side by Side Diff: chrome/common/extensions/docs/server2/template_utility.py

Issue 10500004: Die build.py, Die: Part 2 (LocalFetcher, Handlebar support, build script) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import json
6
7 from third_party.handlebar import Handlebar
8
9 class TemplateUtility(object):
10 def RenderTemplate(self, json_str, content):
Aaron Boodman 2012/06/02 07:50:22 Nit: It would be more intuitive to me if the templ
cduvall 2012/06/02 19:12:05 Done.
11 template = Handlebar(content)
12 content = template.render(json.loads(json_str), {'templates': []}).text
13 return content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698