diff 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
line wrap: on
line diff
--- a/piecrust/app.py	Wed Oct 12 21:01:42 2016 -0700
+++ b/piecrust/app.py	Mon Oct 10 21:41:59 2016 -0700
@@ -67,6 +67,10 @@
                 path=path, theme_path=theme_path,
                 cache=config_cache, theme_config=self.theme_site)
 
+        local_path = os.path.join(
+                self.root_dir, 'configs', 'local.yml')
+        config.addVariant(local_path, raise_if_not_found=False)
+
         if self.theme_site:
             variant_path = os.path.join(
                     self.root_dir, 'configs', 'theme_preview.yml')