From 034e03afff717ec3a03c0a731855f407aa9a19ed Mon Sep 17 00:00:00 2001 From: Reena-cell Date: Mon, 10 Oct 2022 12:21:07 +0200 Subject: [PATCH] update customer_list --- apimanager/apimanager/settings.py | 1 + apimanager/apimanager/urls.py | 1 + apimanager/atms/views.py | 1 - apimanager/base/templates/base.html | 3 +- apimanager/customerlist/__init__.py | 0 apimanager/customerlist/admin.py | 3 + apimanager/customerlist/apps.py | 5 + apimanager/customerlist/forms.py | 0 apimanager/customerlist/models.py | 4 + .../static/customerlist/css/customerlist.css | 18 +++ .../static/customerlist/js/customerlist.js | 5 + .../templates/customerlist/customerlist.html | 43 ++++++++ apimanager/customerlist/tests.py | 3 + apimanager/customerlist/urls.py | 16 +++ apimanager/customerlist/views.py | 104 ++++++++++++++++++ apimanager/customers/urls.py | 1 - .../templates/productlist/productlist.html | 1 + apimanager/productlist/urls.py | 5 +- apimanager/productlist/views.py | 2 +- .../products/templates/products/index.html | 13 ++- apimanager/products/urls.py | 7 +- apimanager/products/views.py | 28 ++++- 22 files changed, 251 insertions(+), 13 deletions(-) create mode 100644 apimanager/customerlist/__init__.py create mode 100644 apimanager/customerlist/admin.py create mode 100644 apimanager/customerlist/apps.py create mode 100644 apimanager/customerlist/forms.py create mode 100644 apimanager/customerlist/models.py create mode 100644 apimanager/customerlist/static/customerlist/css/customerlist.css create mode 100644 apimanager/customerlist/static/customerlist/js/customerlist.js create mode 100644 apimanager/customerlist/templates/customerlist/customerlist.html create mode 100644 apimanager/customerlist/tests.py create mode 100644 apimanager/customerlist/urls.py create mode 100644 apimanager/customerlist/views.py diff --git a/apimanager/apimanager/settings.py b/apimanager/apimanager/settings.py index f60d7f0..1a1484a 100644 --- a/apimanager/apimanager/settings.py +++ b/apimanager/apimanager/settings.py @@ -59,6 +59,7 @@ INSTALLED_APPS = [ 'productlist', 'entitlementrequests', 'customers', + 'customerlist', 'metrics', 'config', 'webui', diff --git a/apimanager/apimanager/urls.py b/apimanager/apimanager/urls.py index abc8540..8f78b8a 100644 --- a/apimanager/apimanager/urls.py +++ b/apimanager/apimanager/urls.py @@ -43,6 +43,7 @@ urlpatterns += i18n_patterns( url(r'^products/', include('products.urls')), url(r'^products/list', include('productlist.urls')), url(r'^customers/', include('customers.urls')), + url(r'^customer/list', include('customerlist.urls')), url(r'^metrics/', include('metrics.urls')), url(r'^config/', include('config.urls')), url(r'^webui/', include('webui.urls')), diff --git a/apimanager/atms/views.py b/apimanager/atms/views.py index 34051da..e8d5154 100644 --- a/apimanager/atms/views.py +++ b/apimanager/atms/views.py @@ -31,7 +31,6 @@ class IndexAtmsView(LoginRequiredMixin, FormView): # Cannot add api in constructor: super complains about unknown kwarg form.api = self.api fields = form.fields - print(fields, "These are fields") try: fields['bank_id'].choices = self.api.get_bank_id_choices() fields['is_accessible'].choices = [('',_('Choose...')),(True, True), (False, False)] diff --git a/apimanager/base/templates/base.html b/apimanager/base/templates/base.html index de9c360..fce2a08 100644 --- a/apimanager/base/templates/base.html +++ b/apimanager/base/templates/base.html @@ -59,11 +59,12 @@
  • {% trans "KPI Dashboard" %}
  • - {% url "branches_list" as branches_list_url %} {% url "customers-create" as customers_create_url %} {% url "atms_create" as atms_create_url %} {% url "atm-list" as atm_list_url %} {% url "product-list" as product_list_url %} {% url "products-create" as product_create_url %} + {% url "branches_list" as branches_list_url %} {% url "customers-create" as customers_create_url %} {% url "customer-list" as customer_list_url %} {% url "atms_create" as atms_create_url %} {% url "atm-list" as atm_list_url %} {% url "product-list" as product_list_url %} {% url "products-create" as product_create_url %}