From 772a1ffce49511c6aaab0d62f070ab338528e537 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 26 Mar 2024 23:00:25 -0300 Subject: [PATCH] chore: rename app payment to account payment --- bd_api/apps/account/apps.py | 3 ++- bd_api/apps/account_auth/apps.py | 3 ++- bd_api/apps/{payment => account_payment}/__init__.py | 0 bd_api/apps/{payment => account_payment}/admin.py | 0 bd_api/apps/{payment => account_payment}/apps.py | 6 +++--- bd_api/apps/{payment => account_payment}/graphql.py | 2 +- .../{payment => account_payment}/migrations/__init__.py | 0 bd_api/apps/{payment => account_payment}/models.py | 0 bd_api/apps/{payment => account_payment}/signals.py | 0 bd_api/apps/{payment => account_payment}/tests.gql | 0 bd_api/apps/{payment => account_payment}/tests.py | 0 bd_api/apps/{payment => account_payment}/urls.py | 0 bd_api/apps/{payment => account_payment}/views.py | 0 bd_api/apps/{payment => account_payment}/webhooks.py | 0 bd_api/apps/api/v1/apps.py | 3 +-- bd_api/apps/schema.py | 4 ++-- bd_api/settings/base.py | 5 +++-- bd_api/urls.py | 2 +- 18 files changed, 15 insertions(+), 13 deletions(-) rename bd_api/apps/{payment => account_payment}/__init__.py (100%) rename bd_api/apps/{payment => account_payment}/admin.py (100%) rename bd_api/apps/{payment => account_payment}/apps.py (50%) rename bd_api/apps/{payment => account_payment}/graphql.py (99%) rename bd_api/apps/{payment => account_payment}/migrations/__init__.py (100%) rename bd_api/apps/{payment => account_payment}/models.py (100%) rename bd_api/apps/{payment => account_payment}/signals.py (100%) rename bd_api/apps/{payment => account_payment}/tests.gql (100%) rename bd_api/apps/{payment => account_payment}/tests.py (100%) rename bd_api/apps/{payment => account_payment}/urls.py (100%) rename bd_api/apps/{payment => account_payment}/views.py (100%) rename bd_api/apps/{payment => account_payment}/webhooks.py (100%) diff --git a/bd_api/apps/account/apps.py b/bd_api/apps/account/apps.py index a94c49d7..e4e529da 100644 --- a/bd_api/apps/account/apps.py +++ b/bd_api/apps/account/apps.py @@ -3,8 +3,9 @@ class AccountConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" name = "bd_api.apps.account" + verbose_name = "Contas" + default_auto_field = "django.db.models.BigAutoField" def ready(self): import bd_api.apps.account.signals # noqa diff --git a/bd_api/apps/account_auth/apps.py b/bd_api/apps/account_auth/apps.py index 40e4ef05..b95066a7 100644 --- a/bd_api/apps/account_auth/apps.py +++ b/bd_api/apps/account_auth/apps.py @@ -3,5 +3,6 @@ class AuthConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" name = "bd_api.apps.account_auth" + verbose_name = "Autenticação e Autorização Interna" + default_auto_field = "django.db.models.BigAutoField" diff --git a/bd_api/apps/payment/__init__.py b/bd_api/apps/account_payment/__init__.py similarity index 100% rename from bd_api/apps/payment/__init__.py rename to bd_api/apps/account_payment/__init__.py diff --git a/bd_api/apps/payment/admin.py b/bd_api/apps/account_payment/admin.py similarity index 100% rename from bd_api/apps/payment/admin.py rename to bd_api/apps/account_payment/admin.py diff --git a/bd_api/apps/payment/apps.py b/bd_api/apps/account_payment/apps.py similarity index 50% rename from bd_api/apps/payment/apps.py rename to bd_api/apps/account_payment/apps.py index cc698c86..797c1619 100644 --- a/bd_api/apps/payment/apps.py +++ b/bd_api/apps/account_payment/apps.py @@ -3,9 +3,9 @@ class PaymentConfig(DjstripeAppConfig): - verbose_name = "Stripe" + verbose_name = "Pagamentos" def ready(self): super().ready() - import bd_api.apps.payment.signals # noqa - import bd_api.apps.payment.webhooks # noqa + import bd_api.apps.account_payment.signals # noqa + import bd_api.apps.account_payment.webhooks # noqa diff --git a/bd_api/apps/payment/graphql.py b/bd_api/apps/account_payment/graphql.py similarity index 99% rename from bd_api/apps/payment/graphql.py rename to bd_api/apps/account_payment/graphql.py index c2ac10d7..082343b8 100644 --- a/bd_api/apps/payment/graphql.py +++ b/bd_api/apps/account_payment/graphql.py @@ -12,7 +12,7 @@ from stripe import Customer as StripeCustomer from bd_api.apps.account.models import Account, Subscription -from bd_api.apps.payment.webhooks import add_user, remove_user +from bd_api.apps.account_payment.webhooks import add_user, remove_user from bd_api.custom.graphql_base import CountableConnection, PlainTextNode if settings.STRIPE_LIVE_MODE: diff --git a/bd_api/apps/payment/migrations/__init__.py b/bd_api/apps/account_payment/migrations/__init__.py similarity index 100% rename from bd_api/apps/payment/migrations/__init__.py rename to bd_api/apps/account_payment/migrations/__init__.py diff --git a/bd_api/apps/payment/models.py b/bd_api/apps/account_payment/models.py similarity index 100% rename from bd_api/apps/payment/models.py rename to bd_api/apps/account_payment/models.py diff --git a/bd_api/apps/payment/signals.py b/bd_api/apps/account_payment/signals.py similarity index 100% rename from bd_api/apps/payment/signals.py rename to bd_api/apps/account_payment/signals.py diff --git a/bd_api/apps/payment/tests.gql b/bd_api/apps/account_payment/tests.gql similarity index 100% rename from bd_api/apps/payment/tests.gql rename to bd_api/apps/account_payment/tests.gql diff --git a/bd_api/apps/payment/tests.py b/bd_api/apps/account_payment/tests.py similarity index 100% rename from bd_api/apps/payment/tests.py rename to bd_api/apps/account_payment/tests.py diff --git a/bd_api/apps/payment/urls.py b/bd_api/apps/account_payment/urls.py similarity index 100% rename from bd_api/apps/payment/urls.py rename to bd_api/apps/account_payment/urls.py diff --git a/bd_api/apps/payment/views.py b/bd_api/apps/account_payment/views.py similarity index 100% rename from bd_api/apps/payment/views.py rename to bd_api/apps/account_payment/views.py diff --git a/bd_api/apps/payment/webhooks.py b/bd_api/apps/account_payment/webhooks.py similarity index 100% rename from bd_api/apps/payment/webhooks.py rename to bd_api/apps/account_payment/webhooks.py diff --git a/bd_api/apps/api/v1/apps.py b/bd_api/apps/api/v1/apps.py index 8afe142e..2ea252c9 100644 --- a/bd_api/apps/api/v1/apps.py +++ b/bd_api/apps/api/v1/apps.py @@ -3,7 +3,6 @@ class ApiConfig(AppConfig): - app_label = "v1" - verbose_name = " V1" name = "bd_api.apps.api.v1" + verbose_name = " API" default_auto_field = "django.db.models.BigAutoField" diff --git a/bd_api/apps/schema.py b/bd_api/apps/schema.py index 2785e128..de4065e3 100644 --- a/bd_api/apps/schema.py +++ b/bd_api/apps/schema.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- from bd_api.apps.account.graphql import AccountMutation -from bd_api.apps.api.v1.graphql import APIQuery -from bd_api.apps.payment.graphql import ( +from bd_api.apps.account_payment.graphql import ( StripeCustomerMutation, StripePriceQuery, StripeSubscriptionCustomerMutation, StripeSubscriptionMutation, ) +from bd_api.apps.api.v1.graphql import APIQuery from bd_api.custom.graphql_auto import build_schema schema = build_schema( diff --git a/bd_api/settings/base.py b/bd_api/settings/base.py index 66372eb3..0a7ad704 100644 --- a/bd_api/settings/base.py +++ b/bd_api/settings/base.py @@ -45,6 +45,7 @@ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + # "health_check", "health_check.db", # @@ -56,10 +57,10 @@ "huey.contrib.djhuey", # "bd_api.apps.account", - "bd_api.apps.api.v1", "bd_api.apps.account_auth", + "bd_api.apps.account_payment.apps.PaymentConfig", + "bd_api.apps.api.v1", "bd_api.apps.core", - "bd_api.apps.payment.apps.PaymentConfig", ] MIDDLEWARE = [ diff --git a/bd_api/urls.py b/bd_api/urls.py index 1d6891c7..c4d1ca89 100644 --- a/bd_api/urls.py +++ b/bd_api/urls.py @@ -42,6 +42,6 @@ def graphql_view(): path("search/debug/", include("haystack.urls")), path("dataset/", DatasetRedirectView.as_view()), path("dataset_redirect/", DatasetRedirectView.as_view()), - path("payment/", include("bd_api.apps.payment.urls")), + path("payment/", include("bd_api.apps.account_payment.urls")), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)