From ed457e128f41e04fa69377ab3b3111d3b0d25836 Mon Sep 17 00:00:00 2001 From: PengfeiLi0218 Date: Thu, 31 Jan 2019 20:16:41 +0800 Subject: [PATCH] Change Customer menu item to Resources which is a drop down menu #74 --- apimanager/base/templates/base.html | 7 ++++++- apimanager/users/views.py | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apimanager/base/templates/base.html b/apimanager/base/templates/base.html index 4f78b390..5bee771b 100644 --- a/apimanager/base/templates/base.html +++ b/apimanager/base/templates/base.html @@ -52,7 +52,12 @@ {% url "customers-create" as customers_create_url %} - Customers + {% url "config-index" as config_index_url %} Config {% if API_TESTER_URL %} diff --git a/apimanager/users/views.py b/apimanager/users/views.py index d80e6ba1..55042dbd 100644 --- a/apimanager/users/views.py +++ b/apimanager/users/views.py @@ -57,8 +57,8 @@ def get_users_rolenames(self, context): except APIError as err: messages.error(self.request, err) return [], [] - except: - messages.error(self.request, "Unknown Error") + except Exception as inst: + messages.error(self.request, "Unknown Error {}".format(type(inst).__name__)) return [], [] role_names = [] @@ -69,8 +69,8 @@ def get_users_rolenames(self, context): except KeyError as err: messages.error(self.request, 'KeyError: {}'.format(err)) return [], [] - except: - messages.error(self.request, "Unknown Error") + except Exception as inst: + messages.error(self.request, "Unknown Error {}".format(type(inst).__name__)) return [], [] role_names = list(set(role_names))