From e3c312c23b45f50b583f42dadfa15f60a7544359 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 9 Jun 2016 02:10:01 +0800 Subject: solve access testresults.opnfv.org/swagger/spec.html fail issue in testAPI add swagger configuration in config.ini add swagger.docs() process in server.py add swagger configuration parse in config.py add basePath() in settings.py change 'basePath' item assignment in views.py JIRA: FUNCTEST-305 Change-Id: I049991d4d53b78755ee971021ec0ad2458f5da60 Signed-off-by: SerenaFeng --- result_collection_api/opnfv_testapi/tornado_swagger/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'result_collection_api/opnfv_testapi/tornado_swagger/settings.py') diff --git a/result_collection_api/opnfv_testapi/tornado_swagger/settings.py b/result_collection_api/opnfv_testapi/tornado_swagger/settings.py index 001d558..88d0d0f 100644 --- a/result_collection_api/opnfv_testapi/tornado_swagger/settings.py +++ b/result_collection_api/opnfv_testapi/tornado_swagger/settings.py @@ -16,7 +16,7 @@ STATIC_PATH = os.path.join(os.path.dirname(os.path.normpath(__file__)), 'static') default_settings = { - 'base_url': '/', + 'base_url': '', 'static_path': STATIC_PATH, 'swagger_prefix': '/swagger', 'api_version': 'v1.0', @@ -26,3 +26,7 @@ default_settings = { } models = [] + + +def basePath(): + return default_settings.get('base_url') -- cgit 1.2.3-korg