diff options
Diffstat (limited to 'opnfv_testapi')
-rw-r--r-- | opnfv_testapi/cmd/server.py | 2 | ||||
-rw-r--r-- | opnfv_testapi/common/config.py | 4 | ||||
-rw-r--r-- | opnfv_testapi/tests/unit/common/normal.ini | 3 | ||||
-rw-r--r-- | opnfv_testapi/ui/root.py | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/opnfv_testapi/cmd/server.py b/opnfv_testapi/cmd/server.py index d503c8a..fee5877 100644 --- a/opnfv_testapi/cmd/server.py +++ b/opnfv_testapi/cmd/server.py @@ -45,7 +45,7 @@ my_logger.addHandler(handler) def make_app(): swagger.docs(base_url=CONF.swagger_base_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/opnfv_testapi/common/config.py b/opnfv_testapi/common/config.py index a6ab338..75bacf3 100644 --- a/opnfv_testapi/common/config.py +++ b/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') self.base_path = "/home/testapi" def _parse(self): diff --git a/opnfv_testapi/tests/unit/common/normal.ini b/opnfv_testapi/tests/unit/common/normal.ini index 6906913..678cb68 100644 --- a/opnfv_testapi/tests/unit/common/normal.ini +++ b/opnfv_testapi/tests/unit/common/normal.ini @@ -16,3 +16,6 @@ log_file = /dev/null [swagger] base_url = http://localhost:8000 + +[ui] +static_path = /usr/local/share/opnfv_testapi diff --git a/opnfv_testapi/ui/root.py b/opnfv_testapi/ui/root.py index 5b2c922..7f970b2 100644 --- a/opnfv_testapi/ui/root.py +++ b/opnfv_testapi/ui/root.py @@ -4,7 +4,7 @@ from opnfv_testapi.common.config import CONF class RootHandler(GenericApiHandler): def get_template_path(self): - return CONF.static_path + return CONF.ui_static_path def get(self): self.render('testapi-ui/index.html') |