Mercurial > piecrust2
comparison piecrust/app.py @ 805:fd694f1297c7
config: Cleanup config loading code. Add support for a `local.yml` config.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 10 Oct 2016 21:41:59 -0700 |
parents | 6abb436fea5b |
children | aca04e175488 |
comparison
equal
deleted
inserted
replaced
804:08e6484a2600 | 805:fd694f1297c7 |
---|---|
64 | 64 |
65 config_cache = self.cache.getCache('app') | 65 config_cache = self.cache.getCache('app') |
66 config = PieCrustConfiguration( | 66 config = PieCrustConfiguration( |
67 path=path, theme_path=theme_path, | 67 path=path, theme_path=theme_path, |
68 cache=config_cache, theme_config=self.theme_site) | 68 cache=config_cache, theme_config=self.theme_site) |
69 | |
70 local_path = os.path.join( | |
71 self.root_dir, 'configs', 'local.yml') | |
72 config.addVariant(local_path, raise_if_not_found=False) | |
69 | 73 |
70 if self.theme_site: | 74 if self.theme_site: |
71 variant_path = os.path.join( | 75 variant_path = os.path.join( |
72 self.root_dir, 'configs', 'theme_preview.yml') | 76 self.root_dir, 'configs', 'theme_preview.yml') |
73 config.addVariant(variant_path, raise_if_not_found=False) | 77 config.addVariant(variant_path, raise_if_not_found=False) |