Anonymous avatar Anonymous committed d829b46

fix to local config template overrides

Comments (0)

Files changed (3)

 
 setup(
     name='silk-deployment',
-    version='0.2.4',
+    version='0.2.5',
     author='Brent Tubbs',
     author_email='brent.tubbs@gmail.com',
 	packages=find_packages(),
 def _upload_config_template(template, dest, context):
     #first try to load the template from the local cfg_templates dir.
     #if it's not there then try loading from pkg_resources
-    path = silk.lib.get_template_path(template)
+    path = silk.lib.get_template_path(template, env.local_root)
     upload_template(path, dest, context=context, use_sudo=True)
 
 def _get_nginx_static_snippet(url_path, local_path):
 
 def get_template_path(template, site_root=None):
     """
-    Returns path of template from site cfg_templates dir, if found there, else
-    returns template path from silk's cfg_templates dir.
+    Returns path of template from site conf_templates dir, if found there, else
+    returns template path from silk's conf_templates dir.
     """
     if site_root:
-        localpath=os.path.join(site_root, 'cfg_templates', template)
+        localpath=os.path.join(site_root, 'conf_templates', template)
         if os.path.isfile(localpath):
             return localpath
-    pkgpath=pkg_resources.resource_filename('silk', 'cfg_templates/%s' % template)
+    pkgpath=pkg_resources.resource_filename('silk', 'conf_templates/%s' % template)
     if os.path.isfile(pkgpath):
         return pkgpath
     else:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.