diff --git a/couchpotato/core/_base/clientscript/main.py b/couchpotato/core/_base/clientscript/main.py index efbaa643..b72105b9 100644 --- a/couchpotato/core/_base/clientscript/main.py +++ b/couchpotato/core/_base/clientscript/main.py @@ -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') diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index bd342707..b9ec0c06 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -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})]) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 19ccf4e1..c57e0770 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -234,7 +234,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En debug = config['use_reloader'], gzip = True, cookie_secret = api_key, - login_url = "/login", + login_url = '%slogin/' % web_base, ) Env.set('app', application) @@ -246,7 +246,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En (r'%s(.*)(/?)' % api_base, ApiHandler), # Main API handler (r'%sgetkey(/?)' % web_base, KeyHandler), # Get API key (r'%s' % api_base, RedirectHandler, {"url": web_base + 'docs/'}), # API docs - + # Login handlers (r'%slogin(/?)' % web_base, LoginHandler), (r'%slogout(/?)' % web_base, LogoutHandler), @@ -257,7 +257,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En ]) # Static paths - static_path = '%sstatic/' % api_base + static_path = '%sstatic/' % web_base for dir_name in ['fonts', 'images', 'scripts', 'style']: application.add_handlers(".*$", [ ('%s%s/(.*)' % (static_path, dir_name), StaticFileHandler, {'path': toUnicode(os.path.join(base_path, 'couchpotato', 'static', dir_name))})