summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-09-05 08:24:46 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-05 08:24:46 +0000
commiteb8c0dc254aaa743f31071bfdd863653f6ffe0e6 (patch)
tree22d0cadf5308151eec91f8bad860965623c0f737 /testapi/opnfv_testapi
parentb4500c26170b024b1c7b7a8211aaab4baa0044d3 (diff)
parent97efa7cdf6ea87ec654ca3c6027dbe44b993b176 (diff)
Merge "bugfix: leverage data_files to stop hacking setup.py"
Diffstat (limited to 'testapi/opnfv_testapi')
-rw-r--r--testapi/opnfv_testapi/cmd/server.py2
-rw-r--r--testapi/opnfv_testapi/common/config.py4
-rw-r--r--testapi/opnfv_testapi/router/url_mappings.py2
-rw-r--r--testapi/opnfv_testapi/ui/root.py2
4 files changed, 3 insertions, 7 deletions
diff --git a/testapi/opnfv_testapi/cmd/server.py b/testapi/opnfv_testapi/cmd/server.py
index 50ac049..b7d3caa 100644
--- a/testapi/opnfv_testapi/cmd/server.py
+++ b/testapi/opnfv_testapi/cmd/server.py
@@ -38,7 +38,7 @@ from opnfv_testapi.tornado_swagger import swagger
def make_app():
swagger.docs(base_url=CONF.ui_url,
- static_path=CONF.static_path)
+ static_path=CONF.ui_static_path)
return swagger.Application(
url_mappings.mappings,
debug=CONF.api_debug,
diff --git a/testapi/opnfv_testapi/common/config.py b/testapi/opnfv_testapi/common/config.py
index 03515ad..140e492 100644
--- a/testapi/opnfv_testapi/common/config.py
+++ b/testapi/opnfv_testapi/common/config.py
@@ -20,10 +20,6 @@ class Config(object):
self._set_config_file()
self._parse()
self._parse_per_page()
- self.static_path = os.path.join(
- os.path.dirname(os.path.normpath(__file__)),
- os.pardir,
- 'static')
def _parse(self):
if not os.path.exists(self.config_file):
diff --git a/testapi/opnfv_testapi/router/url_mappings.py b/testapi/opnfv_testapi/router/url_mappings.py
index be6240e..c038e88 100644
--- a/testapi/opnfv_testapi/router/url_mappings.py
+++ b/testapi/opnfv_testapi/router/url_mappings.py
@@ -72,7 +72,7 @@ mappings = [
# static path
(r'/(.*\.(css|png|gif|js|html|json|map|woff2|woff|ttf))',
tornado.web.StaticFileHandler,
- {'path': CONF.static_path}),
+ {'path': CONF.ui_static_path}),
(r'/', root.RootHandler),
(r'/api/v1/auth/signin', sign.SigninHandler),
diff --git a/testapi/opnfv_testapi/ui/root.py b/testapi/opnfv_testapi/ui/root.py
index 069ad5e..576cbdd 100644
--- a/testapi/opnfv_testapi/ui/root.py
+++ b/testapi/opnfv_testapi/ui/root.py
@@ -5,7 +5,7 @@ from opnfv_testapi.resources import handlers
class RootHandler(handlers.GenericApiHandler):
def get_template_path(self):
- return CONF.static_path
+ return CONF.ui_static_path
@check.login
def get(self):