Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/template_data_source.py |
| =================================================================== |
| --- chrome/common/extensions/docs/server2/template_data_source.py (revision 196927) |
| +++ chrome/common/extensions/docs/server2/template_data_source.py (working copy) |
| @@ -51,7 +51,8 @@ |
| compiled_fs_factory, |
| ref_resolver_factory, |
| public_template_path, |
| - private_template_path): |
| + private_template_path, |
| + branch_path=None): |
| self._branch_info = _MakeChannelDict(channel_name) |
| self._api_data_source_factory = api_data_source_factory |
| self._api_list_data_source_factory = api_list_data_source_factory |
| @@ -63,7 +64,9 @@ |
| self._ref_resolver = ref_resolver_factory.Create() |
| self._public_template_path = public_template_path |
| self._private_template_path = private_template_path |
| - self._static_resources = '/%s/static' % channel_name |
| + if branch_path is None: |
| + branch_path = '/' + channel_name |
| + self._static_resources = '%s/static' % branch_path |
|
not at google - send to devlin
2013/04/30 15:37:42
let's just pass in the static path directly rather
方觉(Fang Jue)
2013/05/02 15:29:16
I renamed it to base_path (and make it end with '/
|
| def _CreateTemplate(self, template_name, text): |
| return Handlebar(self._ref_resolver.ResolveAllLinks(text)) |