From a3387aa4ca272ae87baaeeb3c156554d70b75dd8 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 24 Oct 2024 12:20:47 +0200 Subject: [PATCH 01/12] add 'latest' tag to develop branch images --- .github/workflows/build_container_image.yml | 17 +++-- ...d_container_image_non_develop_branches.yml | 69 +++++++++++++++++++ .github/workflows/run_trivy.yml | 4 +- 3 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build_container_image_non_develop_branches.yml diff --git a/.github/workflows/build_container_image.yml b/.github/workflows/build_container_image.yml index ba31a4cc..3a142795 100644 --- a/.github/workflows/build_container_image.yml +++ b/.github/workflows/build_container_image.yml @@ -1,6 +1,9 @@ -name: build and publish container +name: build and publish container - develop branch -on: [push] +on: + push: + branches: + - develop env: DOCKER_HUB_ORGANIZATION: ${{ vars.DOCKER_HUB_ORGANIZATION }} DOCKER_HUB_REPOSITORY_NGINX: apimanager-nginx @@ -17,20 +20,20 @@ jobs: run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT id: extract_branch - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build the Docker image run: | echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io - docker build . --file .github/Dockerfile_nginx_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }}-OC + docker build . --file .github/Dockerfile_nginx_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }}-OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:latest-OC docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }} --all-tags echo docker apimanager-nginx-OC done - docker build . --file .github/Dockerfile_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }}-OC + docker build . --file .github/Dockerfile_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }}-OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest-OC docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker api-manager-OC done - docker build . --file Dockerfile_nginx --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }} + docker build . --file Dockerfile_nginx --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }} --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:latest docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }} --all-tags echo docker apimanager-nginx done - docker build . --file Dockerfile --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }} + docker build . --file Dockerfile --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }} --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker api-manager done - uses: sigstore/cosign-installer@main diff --git a/.github/workflows/build_container_image_non_develop_branches.yml b/.github/workflows/build_container_image_non_develop_branches.yml new file mode 100644 index 00000000..c7d7f261 --- /dev/null +++ b/.github/workflows/build_container_image_non_develop_branches.yml @@ -0,0 +1,69 @@ +name: build and publish container - non develop branches + +on: + push: + branches: + - '*' + - '!develop' +env: + DOCKER_HUB_ORGANIZATION: ${{ vars.DOCKER_HUB_ORGANIZATION }} + DOCKER_HUB_REPOSITORY_NGINX: apimanager-nginx + DOCKER_HUB_REPOSITORY: api-manager + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Extract branch name + shell: bash + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT + id: extract_branch + + - uses: actions/checkout@v4 + - name: Build the Docker image + run: | + echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io + docker build . --file .github/Dockerfile_nginx_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }}-OC + docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }} --all-tags + echo docker apimanager-nginx-OC done + docker build . --file .github/Dockerfile_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }}-OC + docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags + echo docker api-manager-OC done + docker build . --file Dockerfile_nginx --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }} + docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }} --all-tags + echo docker apimanager-nginx done + docker build . --file Dockerfile --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }} + docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags + echo docker api-manager done + - uses: sigstore/cosign-installer@main + - name: Write signing key to disk (only needed for `cosign sign --key`) + run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key + - name: Sign container image with annotations from our environment + env: + COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} + run: | + cosign sign -y --key cosign.key \ + -a "repo=${{ github.repository }}" \ + -a "workflow=${{ github.workflow }}" \ + -a "ref=${{ github.sha }}" \ + docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }}-OC + cosign sign -y --key cosign.key \ + -a "repo=${{ github.repository }}" \ + -a "workflow=${{ github.workflow }}" \ + -a "ref=${{ github.sha }}-nginx" \ + docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }}-OC + cosign sign -y --key cosign.key \ + -a "repo=${{ github.repository }}" \ + -a "workflow=${{ github.workflow }}" \ + -a "ref=${{ github.sha }}" \ + docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${{ steps.extract_branch.outputs.branch }} + cosign sign -y --key cosign.key \ + -a "repo=${{ github.repository }}" \ + -a "workflow=${{ github.workflow }}" \ + -a "ref=${{ github.sha }}-nginx" \ + docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY_NGINX }}:${{ steps.extract_branch.outputs.branch }} + + + diff --git a/.github/workflows/run_trivy.yml b/.github/workflows/run_trivy.yml index d9a0a70c..89ad5d23 100644 --- a/.github/workflows/run_trivy.yml +++ b/.github/workflows/run_trivy.yml @@ -2,7 +2,9 @@ name: scan container image on: workflow_run: - workflows: [build and publish container] + workflows: + - build and publish container - develop branch + - build and publish container - non develop branches types: - completed env: From 606fe7b1ae8de6a9608f9c1ca8588f7b1f92e4b8 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 24 Oct 2024 12:36:03 +0200 Subject: [PATCH 02/12] add 'latest' tag to develop branch images --- .github/workflows/build_container_image.yml | 2 +- .../workflows/build_container_image_non_develop_branches.yml | 2 +- .github/workflows/run_trivy.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_container_image.yml b/.github/workflows/build_container_image.yml index 3a142795..eea0fa76 100644 --- a/.github/workflows/build_container_image.yml +++ b/.github/workflows/build_container_image.yml @@ -1,4 +1,4 @@ -name: build and publish container - develop branch +name: build and publish container develop branch on: push: diff --git a/.github/workflows/build_container_image_non_develop_branches.yml b/.github/workflows/build_container_image_non_develop_branches.yml index c7d7f261..49490a54 100644 --- a/.github/workflows/build_container_image_non_develop_branches.yml +++ b/.github/workflows/build_container_image_non_develop_branches.yml @@ -1,4 +1,4 @@ -name: build and publish container - non develop branches +name: build and publish container non develop branches on: push: diff --git a/.github/workflows/run_trivy.yml b/.github/workflows/run_trivy.yml index 89ad5d23..160353fe 100644 --- a/.github/workflows/run_trivy.yml +++ b/.github/workflows/run_trivy.yml @@ -3,8 +3,8 @@ name: scan container image on: workflow_run: workflows: - - build and publish container - develop branch - - build and publish container - non develop branches + - build and publish container develop branch + - build and publish container non develop branches types: - completed env: From 724364f9aa7cf92a315b3ea5467d65210ee42ee1 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 24 Oct 2024 13:04:58 +0200 Subject: [PATCH 03/12] add 'latest' tag to develop branch images --- .github/workflows/build_container_image.yml | 2 +- .../workflows/build_container_image_non_develop_branches.yml | 2 +- .github/workflows/run_trivy.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_container_image.yml b/.github/workflows/build_container_image.yml index eea0fa76..fab29e82 100644 --- a/.github/workflows/build_container_image.yml +++ b/.github/workflows/build_container_image.yml @@ -1,4 +1,4 @@ -name: build and publish container develop branch +name: build and publish container develop branch on: push: diff --git a/.github/workflows/build_container_image_non_develop_branches.yml b/.github/workflows/build_container_image_non_develop_branches.yml index 49490a54..d882893e 100644 --- a/.github/workflows/build_container_image_non_develop_branches.yml +++ b/.github/workflows/build_container_image_non_develop_branches.yml @@ -1,4 +1,4 @@ -name: build and publish container non develop branches +name: build and publish container non develop branches on: push: diff --git a/.github/workflows/run_trivy.yml b/.github/workflows/run_trivy.yml index 160353fe..3a6e78c4 100644 --- a/.github/workflows/run_trivy.yml +++ b/.github/workflows/run_trivy.yml @@ -3,8 +3,8 @@ name: scan container image on: workflow_run: workflows: - - build and publish container develop branch - - build and publish container non develop branches + - build and publish container develop branch + - build and publish container non develop branches types: - completed env: From 8c363c840341e36bb176ef9ec34a58060479f3be Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 24 Oct 2024 13:24:39 +0200 Subject: [PATCH 04/12] add 'latest' tag to develop branch images --- .github/workflows/run_trivy.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_trivy.yml b/.github/workflows/run_trivy.yml index 3a6e78c4..f6311792 100644 --- a/.github/workflows/run_trivy.yml +++ b/.github/workflows/run_trivy.yml @@ -2,11 +2,8 @@ name: scan container image on: workflow_run: - workflows: - - build and publish container develop branch - - build and publish container non develop branches - types: - - completed + workflows: [build and publish container develop branch, build and publish container non develop branches] + types: [completed] env: ## Sets environment variable DOCKER_HUB_ORGANIZATION: ${{ vars.DOCKER_HUB_ORGANIZATION }} From 658b8fdcc8c08bec80b058116a6d1f612609035c Mon Sep 17 00:00:00 2001 From: tawoe Date: Wed, 30 Oct 2024 10:50:00 +0100 Subject: [PATCH 05/12] trivy remove undefined parameters --- .github/workflows/run_trivy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run_trivy.yml b/.github/workflows/run_trivy.yml index f6311792..f6109fc1 100644 --- a/.github/workflows/run_trivy.yml +++ b/.github/workflows/run_trivy.yml @@ -39,7 +39,6 @@ jobs: format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - security-checks: 'vuln' severity: 'CRITICAL,HIGH' timeout: '30m' cache-dir: .trivy From c9e78bcd0beeda667af2b50f47955634caf36d47 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 31 Oct 2024 12:23:11 +0100 Subject: [PATCH 06/12] bump django to 3.2 --- apimanager/accountlist/apps.py | 2 +- apimanager/apicollectionlist/apps.py | 4 ++-- apimanager/atmlist/apps.py | 2 +- apimanager/banklist/apps.py | 2 +- apimanager/customerlist/apps.py | 2 +- apimanager/productlist/apps.py | 2 +- apimanager/systemviews/apps.py | 4 ++-- apimanager/users/apps.py | 6 +++--- apimanager/webui/apps.py | 2 +- requirements.txt | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apimanager/accountlist/apps.py b/apimanager/accountlist/apps.py index 50a7695e..640746f0 100644 --- a/apimanager/accountlist/apps.py +++ b/apimanager/accountlist/apps.py @@ -2,4 +2,4 @@ class AccountConfig(AppConfig): - name = 'account-list' + name = 'accountlist' diff --git a/apimanager/apicollectionlist/apps.py b/apimanager/apicollectionlist/apps.py index 3ebc4d0e..3e2972d4 100644 --- a/apimanager/apicollectionlist/apps.py +++ b/apimanager/apicollectionlist/apps.py @@ -1,5 +1,5 @@ from django.apps import AppConfig -class CustomersConfig(AppConfig): - name = 'customers_list' +class ApiCollectionListConfig(AppConfig): + name = 'apicollectionlist' diff --git a/apimanager/atmlist/apps.py b/apimanager/atmlist/apps.py index 5a0728f6..0bd3ca56 100644 --- a/apimanager/atmlist/apps.py +++ b/apimanager/atmlist/apps.py @@ -2,4 +2,4 @@ class AtmsConfig(AppConfig): - name = 'atms_list' + name = 'atmlist' diff --git a/apimanager/banklist/apps.py b/apimanager/banklist/apps.py index 26b574f7..e7848c60 100644 --- a/apimanager/banklist/apps.py +++ b/apimanager/banklist/apps.py @@ -2,4 +2,4 @@ class BanksConfig(AppConfig): - name = 'banks_list' + name = 'banklist' diff --git a/apimanager/customerlist/apps.py b/apimanager/customerlist/apps.py index 3ebc4d0e..7674b8c6 100644 --- a/apimanager/customerlist/apps.py +++ b/apimanager/customerlist/apps.py @@ -2,4 +2,4 @@ class CustomersConfig(AppConfig): - name = 'customers_list' + name = 'customerlist' diff --git a/apimanager/productlist/apps.py b/apimanager/productlist/apps.py index 2c7234f0..25fd5cca 100644 --- a/apimanager/productlist/apps.py +++ b/apimanager/productlist/apps.py @@ -2,4 +2,4 @@ class ProductsConfig(AppConfig): - name = 'products_list' + name = 'productlist' \ No newline at end of file diff --git a/apimanager/systemviews/apps.py b/apimanager/systemviews/apps.py index 6908fb36..7f06bb41 100644 --- a/apimanager/systemviews/apps.py +++ b/apimanager/systemviews/apps.py @@ -1,5 +1,5 @@ from django.apps import AppConfig -class AtmsConfig(AppConfig): - name = 'atms' +class SystemViewsConfig(AppConfig): + name = 'systemviews' diff --git a/apimanager/users/apps.py b/apimanager/users/apps.py index 2515a207..f79ed4ed 100644 --- a/apimanager/users/apps.py +++ b/apimanager/users/apps.py @@ -6,6 +6,6 @@ from django.apps import AppConfig -class BranchesConfig(AppConfig): - """Config for branches""" - name = 'branches' +class UsersConfig(AppConfig): + """Config for users""" + name = 'users' diff --git a/apimanager/webui/apps.py b/apimanager/webui/apps.py index cf9cc5c0..b02f23c4 100644 --- a/apimanager/webui/apps.py +++ b/apimanager/webui/apps.py @@ -8,4 +8,4 @@ class WebuiConfig(AppConfig): """Config for config""" - name = 'Webui' + name = 'webui' diff --git a/requirements.txt b/requirements.txt index ffd27af7..29432a64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -psycopg2 +psycopg2-binary #Django==1.11.7 -Django==2.2.28 +Django==3.2.25 oauthlib==3.2.2 requests==2.32.3 requests-oauthlib==1.3.1 From b295d51e7e1a1cd6f3b6cfee762d5ad425788ca8 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 31 Oct 2024 12:56:29 +0100 Subject: [PATCH 07/12] replace deprecated url with re_path --- apimanager/accountlist/urls.py | 6 +-- apimanager/accounts/urls.py | 4 +- apimanager/apicollectionlist/urls.py | 6 +-- apimanager/apicollections/urls.py | 17 +++----- apimanager/apimanager/urls.py | 60 +++++++++++++------------- apimanager/atmlist/urls.py | 6 +-- apimanager/atms/urls.py | 12 +++--- apimanager/banklist/urls.py | 4 +- apimanager/banks/urls.py | 12 +++--- apimanager/branches/urls.py | 6 +-- apimanager/config/urls.py | 4 +- apimanager/connectormethod/urls.py | 8 ++-- apimanager/consumers/urls.py | 10 ++--- apimanager/customerlist/urls.py | 6 +-- apimanager/customers/urls.py | 4 +- apimanager/dynamicendpoints/urls.py | 8 ++-- apimanager/entitlementrequests/urls.py | 8 ++-- apimanager/methodrouting/urls.py | 8 ++-- apimanager/metrics/urls.py | 24 +++++------ apimanager/obp/urls.py | 12 +++--- apimanager/productlist/urls.py | 6 +-- apimanager/products/urls.py | 8 ++-- apimanager/systemviews/urls.py | 4 +- apimanager/users/urls.py | 18 ++++---- apimanager/webui/urls.py | 8 ++-- requirements.txt | 2 +- 26 files changed, 134 insertions(+), 137 deletions(-) diff --git a/apimanager/accountlist/urls.py b/apimanager/accountlist/urls.py index 66d4b9ab..b4769c80 100644 --- a/apimanager/accountlist/urls.py +++ b/apimanager/accountlist/urls.py @@ -3,14 +3,14 @@ URLs for Account list app """ -from django.conf.urls import url +from django.urls import re_path from .views import AccountListView, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', AccountListView.as_view(), name='account-list'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv-account') ] diff --git a/apimanager/accounts/urls.py b/apimanager/accounts/urls.py index 1b499473..a56ac755 100644 --- a/apimanager/accounts/urls.py +++ b/apimanager/accounts/urls.py @@ -3,11 +3,11 @@ URLs for Account app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexAccountsView urlpatterns = [ - url(r'^create', + re_path(r'^create', IndexAccountsView.as_view(), name='accounts-create'), diff --git a/apimanager/apicollectionlist/urls.py b/apimanager/apicollectionlist/urls.py index 2b0e83c6..e7943faf 100644 --- a/apimanager/apicollectionlist/urls.py +++ b/apimanager/apicollectionlist/urls.py @@ -3,14 +3,14 @@ URLs for Api Collection list app """ -from django.conf.urls import url +from django.urls import re_path from .views import ApiCollectionListView, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', ApiCollectionListView.as_view(), name='apicollection-list'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv-apicollection') ] diff --git a/apimanager/apicollections/urls.py b/apimanager/apicollections/urls.py index b3b68517..12c595b5 100644 --- a/apimanager/apicollections/urls.py +++ b/apimanager/apicollections/urls.py @@ -3,28 +3,25 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from apicollections.views import IndexView, apicollections_save, \ apicollections_delete, DetailView, DeleteCollectionEndpointView, apicollections_update urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='apicollections-index'), - url(r'save/apicollection', apicollections_save, + re_path(r'save/apicollection', apicollections_save, name='apicollection-save'), - url(r'update/apicollection', apicollections_update, + re_path(r'update/apicollection', apicollections_update, name='apicollection-update'), - url(r'delete/apicollection', apicollections_delete, + re_path(r'delete/apicollection', apicollections_delete, name='apicollection-delete'), - url(r'^my-api-collection-ids/(?P[\w\@\.\+-]+)$', + re_path(r'^my-api-collection-ids/(?P[\w\@\.\+-]+)$', DetailView.as_view(), name='my-api-collection-detail'), - url(r'^delete/api-collections/(?P[\w-]+)/api-collection-endpoint/(?P[\w\@\.\+-]+)$', + re_path(r'^delete/api-collections/(?P[\w-]+)/api-collection-endpoint/(?P[\w\@\.\+-]+)$', DeleteCollectionEndpointView.as_view(), name='delete-api-collection-endpoint'), - # url(r'^add/api-collections/(?P[\w-]+)/api-collection-endpoints/(?P[\w\@\.\+-]+)$', - # AddCollectionEndpointView.as_view(), - # name='add-api-collection-endpoint'), ] diff --git a/apimanager/apimanager/urls.py b/apimanager/apimanager/urls.py index 4dfef6cf..32143b33 100644 --- a/apimanager/apimanager/urls.py +++ b/apimanager/apimanager/urls.py @@ -3,7 +3,7 @@ URLs for apimanager """ -from django.conf.urls import url, include +from django.urls import re_path, include from django.conf.urls.i18n import i18n_patterns from base.views import HomeView @@ -16,13 +16,13 @@ urlpatterns = [ #These pages URLs have no GUI - url(r'^oauth/initiate$', + re_path(r'^oauth/initiate$', OAuthInitiateView.as_view(), name='oauth-initiate'), - url(r'^oauth/authorize$', + re_path(r'^oauth/authorize$', OAuthAuthorizeView.as_view(), name='oauth-authorize'), - url(r'^directlogin$', + re_path(r'^directlogin$', DirectLoginView.as_view(), name='directlogin'), - url(r'^gatewaylogin$', + re_path(r'^gatewaylogin$', GatewayLoginView.as_view(), name='gatewaylogin'), # Defining authentication URLs here and not including oauth.urls for # backward compatibility @@ -30,32 +30,32 @@ urlpatterns += i18n_patterns( #urlpatterns = ( url(r'^$', HomeView.as_view(), name="home"), - url(r'^single-sign-on', + re_path(r'^single-sign-on', OAuthInitiateView.as_view(), name='single-sign-on'), - url(r'^logout$', LogoutView.as_view(), name='oauth-logout'), - url(r'^systemviews/', include('systemviews.urls')), - url(r'^accounts/', include('accounts.urls')), - url(r'^account/list', include('accountlist.urls')), - url(r'^consumers/', include('consumers.urls')), - url(r'^entitlementrequests/', include('entitlementrequests.urls')), - url(r'^users/', include('users.urls')), - url(r'^branches/', include('branches.urls')), - url(r'^atms/', include('atms.urls')), - url(r'^atms/list', include('atmlist.urls')), - url(r'^banks/', include('banks.urls')), - url(r'^banks/list', include('banklist.urls')), - 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')), - url(r'^methodrouting/', include('methodrouting.urls')), - url(r'^connectormethod/', include('connectormethod.urls')), - url(r'^dynamicendpoints/', include('dynamicendpoints.urls')), - url(r'^apicollections/', include('apicollections.urls')), - url(r'^apicollections-list', include('apicollectionlist.urls')), + re_path(r'^logout$', LogoutView.as_view(), name='oauth-logout'), + re_path(r'^systemviews/', include('systemviews.urls')), + re_path(r'^accounts/', include('accounts.urls')), + re_path(r'^account/list', include('accountlist.urls')), + re_path(r'^consumers/', include('consumers.urls')), + re_path(r'^entitlementrequests/', include('entitlementrequests.urls')), + re_path(r'^users/', include('users.urls')), + re_path(r'^branches/', include('branches.urls')), + re_path(r'^atms/', include('atms.urls')), + re_path(r'^atms/list', include('atmlist.urls')), + re_path(r'^banks/', include('banks.urls')), + re_path(r'^banks/list', include('banklist.urls')), + re_path(r'^products/', include('products.urls')), + re_path(r'^products/list', include('productlist.urls')), + re_path(r'^customers/', include('customers.urls')), + re_path(r'^customer/list', include('customerlist.urls')), + re_path(r'^metrics/', include('metrics.urls')), + re_path(r'^config/', include('config.urls')), + re_path(r'^webui/', include('webui.urls')), + re_path(r'^methodrouting/', include('methodrouting.urls')), + re_path(r'^connectormethod/', include('connectormethod.urls')), + re_path(r'^dynamicendpoints/', include('dynamicendpoints.urls')), + re_path(r'^apicollections/', include('apicollections.urls')), + re_path(r'^apicollections-list', include('apicollectionlist.urls')), ) #prefix_default_language=False, #)+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/apimanager/atmlist/urls.py b/apimanager/atmlist/urls.py index b41d66d6..ed943820 100644 --- a/apimanager/atmlist/urls.py +++ b/apimanager/atmlist/urls.py @@ -3,14 +3,14 @@ URLs for ATM list app """ -from django.conf.urls import url +from django.urls import re_path from .views import AtmListView, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', AtmListView.as_view(), name='atm-list'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv') ] diff --git a/apimanager/atms/urls.py b/apimanager/atms/urls.py index f67b2d7e..95e16ed9 100644 --- a/apimanager/atms/urls.py +++ b/apimanager/atms/urls.py @@ -3,20 +3,20 @@ URLs for metrics app """ -from django.conf.urls import url +from django.urls import re_path from atms.views import IndexAtmsView, UpdateAtmsView, atm_attribute_save, atm_attribute_delete, atm_attribute_update urlpatterns = [ - url(r'^create', + re_path(r'^create', IndexAtmsView.as_view(), name='atms_create'), - url(r'^update/(?P[ 0-9\w|\W\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', + re_path(r'^update/(?P[ 0-9\w|\W\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', UpdateAtmsView.as_view(), name='atms_update'), - url(r'save/attribute', atm_attribute_save, + re_path(r'save/attribute', atm_attribute_save, name='atm_attribute_save'), - url(r'delete/attribute', atm_attribute_delete, + re_path(r'delete/attribute', atm_attribute_delete, name='atm_attribute_delete'), - url(r'updateattribute/attribute', atm_attribute_update, + re_path(r'updateattribute/attribute', atm_attribute_update, name='atm_attribute_update'), ] diff --git a/apimanager/banklist/urls.py b/apimanager/banklist/urls.py index 2bafd124..8c6dcd46 100644 --- a/apimanager/banklist/urls.py +++ b/apimanager/banklist/urls.py @@ -3,11 +3,11 @@ URLs for Bank list app """ -from django.conf.urls import url +from django.urls import re_path from .views import BankListView #, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', BankListView.as_view(), name='bank-list'), diff --git a/apimanager/banks/urls.py b/apimanager/banks/urls.py index 12c72504..11b5a8ec 100644 --- a/apimanager/banks/urls.py +++ b/apimanager/banks/urls.py @@ -3,20 +3,20 @@ URLs for Bank app """ -from django.conf.urls import url +from django.urls import re_path from banks.views import IndexBanksView, UpdateBanksView, bank_attribute_save, bank_attribute_update, bank_attribute_delete urlpatterns = [ - url(r'^create', + re_path(r'^create', IndexBanksView.as_view(), name='banks_create'), - url(r'^update/bank/(?P[0-9\w\@\.\+-]+)/$', + re_path(r'^update/bank/(?P[0-9\w\@\.\+-]+)/$', UpdateBanksView.as_view(), name='banks_update'), - url(r'save/attribute', bank_attribute_save, + re_path(r'save/attribute', bank_attribute_save, name='bank_attribute_save'), - url(r'updateattribute/attribute', bank_attribute_update, + re_path(r'updateattribute/attribute', bank_attribute_update, name='bank_attribute_update'), - url(r'delete/attribute', bank_attribute_delete, + re_path(r'delete/attribute', bank_attribute_delete, name='bank_attribute_delete'), ] \ No newline at end of file diff --git a/apimanager/branches/urls.py b/apimanager/branches/urls.py index 11f3ebce..8cd57505 100644 --- a/apimanager/branches/urls.py +++ b/apimanager/branches/urls.py @@ -3,15 +3,15 @@ URLs for metrics app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexBranchesView, UpdateBranchesView urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexBranchesView.as_view(), name='branches_list'), - url(r'^update/(?P[0-9\w\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', + re_path(r'^update/(?P[0-9\w\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', UpdateBranchesView.as_view(), name='branches_update') ] diff --git a/apimanager/config/urls.py b/apimanager/config/urls.py index 02f9816d..01c182ec 100644 --- a/apimanager/config/urls.py +++ b/apimanager/config/urls.py @@ -3,12 +3,12 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexView urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='config-index'), ] diff --git a/apimanager/connectormethod/urls.py b/apimanager/connectormethod/urls.py index 66d432f3..0f3fc506 100644 --- a/apimanager/connectormethod/urls.py +++ b/apimanager/connectormethod/urls.py @@ -3,16 +3,16 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from connectormethod.views import IndexView, connectormethod_save, connectormethod_update urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='connectormethod'), - url(r'save/connectormethod', connectormethod_save, + re_path(r'save/connectormethod', connectormethod_save, name='connectormethod-save'), - url(r'^update/connectormethod', connectormethod_update, + re_path(r'^update/connectormethod', connectormethod_update, name='connectormethod-update') ] diff --git a/apimanager/consumers/urls.py b/apimanager/consumers/urls.py index 97678ef7..e79395b4 100644 --- a/apimanager/consumers/urls.py +++ b/apimanager/consumers/urls.py @@ -3,21 +3,21 @@ URLs for consumers app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexView, DetailView, EnableView, DisableView urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='consumers-index'), - url(r'^(?P[0-9a-z\-]+)$', + re_path(r'^(?P[0-9a-z\-]+)$', DetailView.as_view(), name='consumers-detail'), - url(r'^(?P[0-9a-z\-]+)/enable$', + re_path(r'^(?P[0-9a-z\-]+)/enable$', EnableView.as_view(), name='consumers-enable'), - url(r'^(?P[0-9a-z\-]+)/disable$', + re_path(r'^(?P[0-9a-z\-]+)/disable$', DisableView.as_view(), name='consumers-disable'), ] diff --git a/apimanager/customerlist/urls.py b/apimanager/customerlist/urls.py index 122fb525..8c79ccfa 100644 --- a/apimanager/customerlist/urls.py +++ b/apimanager/customerlist/urls.py @@ -3,14 +3,14 @@ URLs for customer list app """ -from django.conf.urls import url +from django.urls import re_path from .views import CustomerListView, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', CustomerListView.as_view(), name='customer-list'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv-customer') ] diff --git a/apimanager/customers/urls.py b/apimanager/customers/urls.py index 060fe8c9..45880f64 100644 --- a/apimanager/customers/urls.py +++ b/apimanager/customers/urls.py @@ -3,11 +3,11 @@ URLs for customers app """ -from django.conf.urls import url +from django.urls import re_path from .views import CreateView urlpatterns = [ - url(r'^$', + re_path(r'^$', CreateView.as_view(), name='customers-create'), ] diff --git a/apimanager/dynamicendpoints/urls.py b/apimanager/dynamicendpoints/urls.py index 614dfa07..cf431853 100644 --- a/apimanager/dynamicendpoints/urls.py +++ b/apimanager/dynamicendpoints/urls.py @@ -3,16 +3,16 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from dynamicendpoints.views import IndexView, dynamicendpoints_save,dynamicendpoints_delete urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='dynamicendpoints-index'), - url(r'save/dynamicendpoint', dynamicendpoints_save, + re_path(r'save/dynamicendpoint', dynamicendpoints_save, name='dynamicendpoint-save'), - url(r'delete/dynamicendpoint', dynamicendpoints_delete, + re_path(r'delete/dynamicendpoint', dynamicendpoints_delete, name='dynamicendpoint-delete') ] diff --git a/apimanager/entitlementrequests/urls.py b/apimanager/entitlementrequests/urls.py index d17ea4ca..864e07e0 100644 --- a/apimanager/entitlementrequests/urls.py +++ b/apimanager/entitlementrequests/urls.py @@ -3,18 +3,18 @@ URLs for entitlement requests app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexView, RejectEntitlementRequest, AcceptEntitlementRequest urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='entitlementrequests-index'), - url(r'^entitlement-requests/entitlement_request_id/(?P[\w\@\.\+-]+)$', + re_path(r'^entitlement-requests/entitlement_request_id/(?P[\w\@\.\+-]+)$', RejectEntitlementRequest.as_view(), name='entitlement-request-delete'), - url(r'^entitlement-requests/user_id/(?P[\w\@\.\+-]+)$', + re_path(r'^entitlement-requests/user_id/(?P[\w\@\.\+-]+)$', AcceptEntitlementRequest.as_view(), name='entitlement-request-accept'), ] diff --git a/apimanager/methodrouting/urls.py b/apimanager/methodrouting/urls.py index 0574febb..7930ed44 100644 --- a/apimanager/methodrouting/urls.py +++ b/apimanager/methodrouting/urls.py @@ -3,16 +3,16 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from methodrouting.views import IndexView, methodrouting_save, methodrouting_delete urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='methodrouting-index'), - url(r'save/method', methodrouting_save, + re_path(r'save/method', methodrouting_save, name='methodrouting-save'), - url(r'delete/method', methodrouting_delete, + re_path(r'delete/method', methodrouting_delete, name='methodrouting-delete'), ] diff --git a/apimanager/metrics/urls.py b/apimanager/metrics/urls.py index d94d6b8b..c04d4a2e 100644 --- a/apimanager/metrics/urls.py +++ b/apimanager/metrics/urls.py @@ -3,7 +3,7 @@ URLs for metrics app """ -from django.conf.urls import url +from django.urls import re_path from .views import ( APIMetricsView, @@ -20,37 +20,37 @@ ) urlpatterns = [ - url(r'^api/$', + re_path(r'^api/$', APIMetricsView.as_view(), name='api-metrics'), - url(r'^api/last-endpoint/$', + re_path(r'^api/last-endpoint/$', get_metric_last_endpoint, name='api-metrics-last-endpoint'), - url(r'^api/summary-partial-function$', + re_path(r'^api/summary-partial-function$', APISummaryPartialFunctionView.as_view(), name='api-metrics-summary-partial-function'), - url(r'^connector/$', + re_path(r'^connector/$', ConnectorMetricsView.as_view(), name='connector-metrics'), - url(r'^monthly-summary/$', + re_path(r'^monthly-summary/$', MonthlyMetricsSummaryView.as_view(), name='metrics-summary'), - url(r'^yearly-summary/$', + re_path(r'^yearly-summary/$', YearlySummaryView.as_view(), name='yearly-summary'), - url(r'^quarterly-summary/$', + re_path(r'^quarterly-summary/$', QuarterlySummaryView.as_view(), name='quarterly-summary'), - url(r'^weekly-summary/$', + re_path(r'^weekly-summary/$', WeeklySummaryView.as_view(), name='weekly-summary'), - url(r'^daily-summary/$', + re_path(r'^daily-summary/$', DailySummaryView.as_view(), name='daily-summary'), - url(r'^hourly-summary/$', + re_path(r'^hourly-summary/$', HourlySummaryView.as_view(), name='hourly-summary'), - url(r'^custom-summary/$', + re_path(r'^custom-summary/$', CustomSummaryView.as_view(), name='custom-summary'), ] diff --git a/apimanager/obp/urls.py b/apimanager/obp/urls.py index 097d448d..cbbff78c 100644 --- a/apimanager/obp/urls.py +++ b/apimanager/obp/urls.py @@ -3,7 +3,7 @@ URLs for OBP app """ -from django.conf.urls import url +from django.urls import re_path from .views import ( OAuthInitiateView, OAuthAuthorizeView, @@ -14,14 +14,14 @@ urlpatterns = [ - url(r'^oauth/initiate$', + re_path(r'^oauth/initiate$', OAuthInitiateView.as_view(), name='oauth-initiate'), - url(r'^oauth/authorize$', + re_path(r'^oauth/authorize$', OAuthAuthorizeView.as_view(), name='oauth-authorize'), - url(r'^directlogin$', + re_path(r'^directlogin$', DirectLoginView.as_view(), name='directlogin'), - url(r'^gatewaylogin$', + re_path(r'^gatewaylogin$', GatewayLoginView.as_view(), name='gatewaylogin'), - url(r'^logout$', + re_path(r'^logout$', LogoutView.as_view(), name='oauth-logout'), ] diff --git a/apimanager/productlist/urls.py b/apimanager/productlist/urls.py index 6fd076a9..f8bb1adc 100644 --- a/apimanager/productlist/urls.py +++ b/apimanager/productlist/urls.py @@ -3,14 +3,14 @@ URLs for Product list app """ -from django.conf.urls import url +from django.urls import re_path from .views import ProductListView, ExportCsvView urlpatterns = [ - url(r'^$', + re_path(r'^$', ProductListView.as_view(), name='product-list'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv-product'), diff --git a/apimanager/products/urls.py b/apimanager/products/urls.py index 84e4e9b3..c28123e5 100644 --- a/apimanager/products/urls.py +++ b/apimanager/products/urls.py @@ -3,18 +3,18 @@ URLs for metrics app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexProductView, UpdateProductView, create_list urlpatterns = [ - url(r'^create', + re_path(r'^create', IndexProductView.as_view(), name='products-create'), - url(r'^update/(?P[0-9\w\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', + re_path(r'^update/(?P[0-9\w\@\.\+-]+)/bank/(?P[0-9\w\@\.\+-]+)/$', UpdateProductView.as_view(), name='products_update'), - url(r'^createProductList', + re_path(r'^createProductList', create_list, name = 'create-product-list'), ] diff --git a/apimanager/systemviews/urls.py b/apimanager/systemviews/urls.py index 76a6e132..56906459 100644 --- a/apimanager/systemviews/urls.py +++ b/apimanager/systemviews/urls.py @@ -3,11 +3,11 @@ URLs for System View app """ -from django.conf.urls import url +from django.urls import re_path from .views import SystemView urlpatterns = [ - url(r'^$', + re_path(r'^$', SystemView.as_view(), name='system_view'), ] diff --git a/apimanager/users/urls.py b/apimanager/users/urls.py index c7e38914..3b19edda 100644 --- a/apimanager/users/urls.py +++ b/apimanager/users/urls.py @@ -3,35 +3,35 @@ URLs for users app """ -from django.conf.urls import url +from django.urls import re_path from django.urls import path from .views import IndexView, DetailView, MyDetailView, DeleteEntitlementView, InvitationView, UserStatusUpdateView, \ ExportCsvView, AutocompleteFieldView, DeleteAttributeView urlpatterns = [ - url(r'^all$', + re_path(r'^all$', IndexView.as_view(), name='users-index'), - url(r'^all/user_id/(?P[\w\@\.\+-]+)$', + re_path(r'^all/user_id/(?P[\w\@\.\+-]+)$', DetailView.as_view(), name='users-detail'), - url(r'^myuser$', + re_path(r'^myuser$', MyDetailView.as_view(), name='my-user-detail'), - url(r'^myuser/invitation$', + re_path(r'^myuser/invitation$', InvitationView.as_view(), name='my-user-invitation'), - url(r'^(?P[\w-]+)/entitlement/delete/(?P[\w-]+)$', + re_path(r'^(?P[\w-]+)/entitlement/delete/(?P[\w-]+)$', DeleteEntitlementView.as_view(), name='users-delete-entitlement'), - url(r'^(?P[\w-]+)/atribute/delete/(?P[\w-]+)$', + re_path(r'^(?P[\w-]+)/atribute/delete/(?P[\w-]+)$', DeleteAttributeView.as_view(), name='users-delete-attribute'), - url(r'^(?P[\w-]+)/userStatusUpdateView/(?P[\w\@\.\+-]+)$', + re_path(r'^(?P[\w-]+)/userStatusUpdateView/(?P[\w\@\.\+-]+)$', UserStatusUpdateView.as_view(), name='user-status-update'), - url(r'^export_csv$', + re_path(r'^export_csv$', ExportCsvView.as_view(), name='export-csv-users'), ] diff --git a/apimanager/webui/urls.py b/apimanager/webui/urls.py index ee5f9eec..bb190ca6 100644 --- a/apimanager/webui/urls.py +++ b/apimanager/webui/urls.py @@ -3,16 +3,16 @@ URLs for config app """ -from django.conf.urls import url +from django.urls import re_path from .views import IndexView, webui_save, webui_delete urlpatterns = [ - url(r'^$', + re_path(r'^$', IndexView.as_view(), name='webui-index'), - url(r'save/method', webui_save, + re_path(r'save/method', webui_save, name='methodrouting-save'), - url(r'delete/method', webui_delete, + re_path(r'delete/method', webui_delete, name='methodrouting-delete') ] diff --git a/requirements.txt b/requirements.txt index 29432a64..099257bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ psycopg2-binary #Django==1.11.7 -Django==3.2.25 +Django==4.2.16 oauthlib==3.2.2 requests==2.32.3 requests-oauthlib==1.3.1 From e0bd336909ff1f82ea1e7a3024fda27713c92284 Mon Sep 17 00:00:00 2001 From: tawoe Date: Thu, 31 Oct 2024 13:23:01 +0100 Subject: [PATCH 08/12] replace deprecated ugettext_lazy, ifequal --- apimanager/accounts/forms.py | 2 +- apimanager/accounts/views.py | 2 +- apimanager/apimanager/urls.py | 2 +- apimanager/atms/forms.py | 2 +- apimanager/atms/views.py | 2 +- apimanager/banks/forms.py | 2 +- apimanager/banks/views.py | 2 +- apimanager/base/templates/base.html | 6 +++--- apimanager/branches/forms.py | 2 +- apimanager/customers/forms.py | 2 +- apimanager/metrics/forms.py | 2 +- apimanager/obp/api.py | 2 +- apimanager/products/forms.py | 2 +- apimanager/users/forms.py | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apimanager/accounts/forms.py b/apimanager/accounts/forms.py index 1cf7abe7..3f7a1dcb 100644 --- a/apimanager/accounts/forms.py +++ b/apimanager/accounts/forms.py @@ -3,7 +3,7 @@ """ from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import random diff --git a/apimanager/accounts/views.py b/apimanager/accounts/views.py index b79ebcc5..44055dce 100644 --- a/apimanager/accounts/views.py +++ b/apimanager/accounts/views.py @@ -13,7 +13,7 @@ from django.views.generic import FormView from obp.api import API, APIError from .forms import CreateAccountForm -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class IndexAccountsView(LoginRequiredMixin, FormView): diff --git a/apimanager/apimanager/urls.py b/apimanager/apimanager/urls.py index 32143b33..f3f1fe08 100644 --- a/apimanager/apimanager/urls.py +++ b/apimanager/apimanager/urls.py @@ -29,7 +29,7 @@ ] urlpatterns += i18n_patterns( #urlpatterns = ( - url(r'^$', HomeView.as_view(), name="home"), + re_path(r'^$', HomeView.as_view(), name="home"), re_path(r'^single-sign-on', OAuthInitiateView.as_view(), name='single-sign-on'), re_path(r'^logout$', LogoutView.as_view(), name='oauth-logout'), diff --git a/apimanager/atms/forms.py b/apimanager/atms/forms.py index 4750332a..16b8620b 100644 --- a/apimanager/atms/forms.py +++ b/apimanager/atms/forms.py @@ -3,7 +3,7 @@ """ from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import random diff --git a/apimanager/atms/views.py b/apimanager/atms/views.py index 8e2f0e56..18c4f8e7 100644 --- a/apimanager/atms/views.py +++ b/apimanager/atms/views.py @@ -13,7 +13,7 @@ from django.views.generic import FormView from obp.api import API, APIError from .forms import CreateAtmForm -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.decorators.csrf import csrf_exempt from django.urls import reverse, reverse_lazy from base.utils import exception_handle, error_once_only diff --git a/apimanager/banks/forms.py b/apimanager/banks/forms.py index 327c853d..42d2ad06 100644 --- a/apimanager/banks/forms.py +++ b/apimanager/banks/forms.py @@ -3,7 +3,7 @@ """ from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import random diff --git a/apimanager/banks/views.py b/apimanager/banks/views.py index e8f98381..04095c7c 100644 --- a/apimanager/banks/views.py +++ b/apimanager/banks/views.py @@ -13,7 +13,7 @@ from django.views.generic import FormView from obp.api import API, APIError from .forms import CreateBankForm -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from apimanager.settings import DEBUG from django.views.decorators.csrf import csrf_exempt from base.utils import exception_handle, error_once_only diff --git a/apimanager/base/templates/base.html b/apimanager/base/templates/base.html index c5d7602a..bc771bcd 100644 --- a/apimanager/base/templates/base.html +++ b/apimanager/base/templates/base.html @@ -43,9 +43,9 @@ {% url "api-metrics" as api_metrics_url %} {% url "connector-metrics" as connector_metrics_url %} {% url "weekly-summary" as metrics_summary_url %} @@ -123,7 +123,7 @@ {% if messages %}
{% for message in messages %} -