diff --git a/apimanager/apicollectionlist/views.py b/apimanager/apicollectionlist/views.py index a6961d2..3c6b125 100644 --- a/apimanager/apicollectionlist/views.py +++ b/apimanager/apicollectionlist/views.py @@ -39,8 +39,8 @@ class ApiCollectionListView(IndexView, LoginRequiredMixin, FormView ): api_collections_for_user = api.get(api_collections_for_user_url_path) if 'api_collections' in api_collections_for_user: apicollections_list.extend(api_collections_for_user['api_collections']) - for api_collection_id_with_locale in apicollections_list: - api_collection_id_with_locale["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-collection-id={api_collection_id_with_locale['api_collection_id']}" + for ac in apicollections_list: + ac["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-collection-id={ac['api_collection_id']}" except APIError as err: messages.error(self.request, err) return [] diff --git a/apimanager/apicollections/views.py b/apimanager/apicollections/views.py index f7cf4c1..42ce06c 100644 --- a/apimanager/apicollections/views.py +++ b/apimanager/apicollections/views.py @@ -32,8 +32,8 @@ class IndexView(LoginRequiredMixin, FormView): error_once_only(self.request, response['message']) else: api_collections=response['api_collections'] - for api_collection_id_with_locale in api_collections: - api_collection_id_with_locale["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-collection-id={api_collection_id_with_locale['api_collection_id']}" + for ac in api_collections: + ac["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-collection-id={ac['api_collection_id']}" except APIError as err: messages.error(self.request, err) except Exception as err: diff --git a/apimanager/apimanager/settings.py b/apimanager/apimanager/settings.py index 2e24796..9cc7a5f 100644 --- a/apimanager/apimanager/settings.py +++ b/apimanager/apimanager/settings.py @@ -253,7 +253,7 @@ API_MANAGER_DATE_FORMAT= '%Y-%m-%d' API_HOST = 'http://127.0.0.1:8080' -API_EXPLORER = 'http://127.0.0.1:8082' +API_EXPLORER_HOST = 'http://127.0.0.1:8082' # Only override this if you have a separate portal instance API_PORTAL = API_HOST API_BASE_PATH = '/obp/v' diff --git a/apimanager/dynamicendpoints/views.py b/apimanager/dynamicendpoints/views.py index e095318..e2f3e3c 100644 --- a/apimanager/dynamicendpoints/views.py +++ b/apimanager/dynamicendpoints/views.py @@ -37,8 +37,8 @@ class IndexView(LoginRequiredMixin, FormView): else: dynamic_endpoints=response['dynamic_endpoints'] #Accessing API-Explorer URL, parameters API-Collection Id and selected Language eg. locale=en_GB (for English) - for locale in dynamic_endpoints: - locale["dynamicendpoint_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-dynamic_endpoint-id={locale['dynamic_endpoint_id']}" + for ac in dynamic_endpoints: + ac["dynamicendpoint_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-dynamic_endpoint-id={ac['dynamic_endpoint_id']}" except APIError as err: messages.error(self.request, err) except Exception as err: