Change static path

This commit is contained in:
Ruud
2013-09-10 22:59:31 +02:00
parent 4a71f2c556
commit 31b3c2ef64
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ class ClientScript(Plugin):
for static_type in self.core_static:
for rel_path in self.core_static.get(static_type):
file_path = os.path.join(Env.get('app_dir'), 'couchpotato', 'static', rel_path)
core_url = 'api/%s/static/%s' % (Env.setting('api_key'), rel_path)
core_url = 'static/%s' % rel_path
if static_type == 'script':
self.registerScript(core_url, file_path, position = 'front')
+1 -1
View File
@@ -83,7 +83,7 @@ class Plugin(object):
class_name = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
# View path
path = 'api/%s/static/%s/' % (Env.setting('api_key'), class_name)
path = 'static/plugin/%s/' % (class_name)
# Add handler to Tornado
Env.get('app').add_handlers(".*$", [(Env.get('web_base') + path + '(.*)', StaticFileHandler, {'path': static_folder})])