changeset 271:12657039c436

internal: Re-use the cached resource directory.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 01 Mar 2015 09:06:32 -0800
parents 935bf5682686
children a561fbad0b7f
files piecrust/app.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/app.py	Fri Feb 27 22:30:36 2015 -0800
+++ b/piecrust/app.py	Sun Mar 01 09:06:32 2015 -0800
@@ -7,7 +7,8 @@
 import collections
 import yaml
 from werkzeug.utils import cached_property
-from piecrust import (APP_VERSION,
+from piecrust import (
+        APP_VERSION, RESOURCES_DIR,
         CACHE_DIR, TEMPLATES_DIR, ASSETS_DIR,
         PLUGINS_DIR, THEME_DIR,
         CONFIG_PATH, THEME_CONFIG_PATH,
@@ -471,7 +472,7 @@
         td = self._get_dir(THEME_DIR)
         if td is not None:
             return td
-        return os.path.join(os.path.dirname(__file__), 'resources', 'theme')
+        return os.path.join(RESOURCES_DIR, 'theme')
 
     @cached_property
     def cache_dir(self):