Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename folder to keep module naming consistency
Mira Szewczykb233ecb293dc
diff --git a/saleor/dashboard/payments/__init__.py b/saleor/dashboard/payment/__init__.pysimilarity index 100%rename from saleor/dashboard/payments/__init__.pyrename to saleor/dashboard/payment/__init__.pydiff --git a/saleor/dashboard/payment/urls.py b/saleor/dashboard/payment/urls.pynew file mode 100644index 0000000000..b6dab5336c--- /dev/null+++ b/saleor/dashboard/payment/urls.py@@ -0,0 +1,12 @@+from django.conf.urls import url++from . import views++urlpatterns = [+ url(r"^$", views.index, name="payments-index"),+ url(+ r"^configure/(?P<plugin_name>[\w-]+)$",+ views.configure_payment_gateway,+ name="configure-payment",+ ),+]diff --git a/saleor/dashboard/payments/urls.py b/saleor/dashboard/payments/urls.pydeleted file mode 100644index e9ab2cad34..0000000000--- a/saleor/dashboard/payments/urls.py+++ /dev/null@@ -1,5 +0,0 @@-from django.conf.urls import url--from . import views--urlpatterns = [url(r"^$", views.index, name="payments-index")]diff --git a/saleor/dashboard/payments/views.py b/saleor/dashboard/payments/views.pydeleted file mode 100644index ed2245396f..0000000000--- a/saleor/dashboard/payments/views.py+++ /dev/null@@ -1,29 +0,0 @@-from typing import TYPE_CHECKING--from django.contrib.auth.decorators import permission_required-from django.template.response import TemplateResponse--from ...payment.gateways.braintree.plugin import BraintreeGatewayPlugin-from ...payment.gateways.dummy.plugin import DummyGatewayPlugin-from ...payment.gateways.razorpay.plugin import RazorpayGatewayPlugin-from ...payment.gateways.stripe.plugin import StripeGatewayPlugin-from ..views import staff_member_required--if TYPE_CHECKING:- from django.http import HttpRequest--GATEWAYS_PLUGINS = [- BraintreeGatewayPlugin,- DummyGatewayPlugin,- RazorpayGatewayPlugin,- StripeGatewayPlugin,-]---@staff_member_required-@permission_required("extensions.manage_plugins")-def index(request: "HttpRequest") -> TemplateResponse:- payment_gateways = [gateway.PLUGIN_NAME for gateway in GATEWAYS_PLUGINS]-- ctx = {"payment_gateways": payment_gateways}- return TemplateResponse(request, "dashboard/payments/index.html", ctx)diff --git a/saleor/dashboard/urls.py b/saleor/dashboard/urls.pyindex 7e7e7400ef..fe09c22205 100644--- a/saleor/dashboard/urls.py+++ b/saleor/dashboard/urls.py@@ -8,7 +8,7 @@ from .discount.urls import urlpatterns as discount_urlsfrom .menu.urls import urlpatterns as menu_urlsfrom .order.urls import urlpatterns as order_urlsfrom .page.urls import urlpatterns as page_urls-from .payments.urls import urlpatterns as payments_urls+from .payment.urls import urlpatterns as payments_urlsfrom .product.urls import urlpatterns as product_urlsfrom .search.urls import urlpatterns as search_urlsfrom .shipping.urls import urlpatterns as shipping_urls