From f39ee5f15d11e2af5668f5789a005e0b92ba055a Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Tue, 30 Dec 2025 02:05:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20URL=20configurable?= =?UTF-8?q?kit-*=20=E2=86=92=20configurableproduct-*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - URL paths: configurable-kits/ → configurable/ - URL names: configurablekit-list → configurableproduct-list и т.д. - Обновлены все ссылки в шаблонах и views 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../configurableproduct_confirm_delete.html | 6 +++--- .../products/configurableproduct_detail.html | 6 +++--- .../products/configurableproduct_form.html | 4 ++-- .../products/configurableproduct_list.html | 10 +++++----- myproject/products/urls.py | 18 +++++++++--------- .../views/configurableproduct_views.py | 8 ++++---- myproject/templates/navbar.html | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/myproject/products/templates/products/configurableproduct_confirm_delete.html b/myproject/products/templates/products/configurableproduct_confirm_delete.html index 83572d7..50b7177 100644 --- a/myproject/products/templates/products/configurableproduct_confirm_delete.html +++ b/myproject/products/templates/products/configurableproduct_confirm_delete.html @@ -7,8 +7,8 @@
@@ -37,7 +37,7 @@ - + Отмена diff --git a/myproject/products/templates/products/configurableproduct_detail.html b/myproject/products/templates/products/configurableproduct_detail.html index f0691fa..0210aec 100644 --- a/myproject/products/templates/products/configurableproduct_detail.html +++ b/myproject/products/templates/products/configurableproduct_detail.html @@ -8,7 +8,7 @@
@@ -17,10 +17,10 @@

{{ configurable_kit.name }}

diff --git a/myproject/products/templates/products/configurableproduct_form.html b/myproject/products/templates/products/configurableproduct_form.html index 63e78be..2060016 100644 --- a/myproject/products/templates/products/configurableproduct_form.html +++ b/myproject/products/templates/products/configurableproduct_form.html @@ -36,7 +36,7 @@ input[name*="DELETE"] {
@@ -196,7 +196,7 @@ input[name*="DELETE"] { - Отмена diff --git a/myproject/products/templates/products/configurableproduct_list.html b/myproject/products/templates/products/configurableproduct_list.html index af65921..17f6a8a 100644 --- a/myproject/products/templates/products/configurableproduct_list.html +++ b/myproject/products/templates/products/configurableproduct_list.html @@ -68,7 +68,7 @@ {% for item in configurable_kits %} - + {{ item.name }} @@ -92,15 +92,15 @@ {{ item.created_at|date:"d.m.Y H:i" }} - - - @@ -109,7 +109,7 @@ {% empty %} - Нет вариативных товаров. Создать первый + Нет вариативных товаров. Создать первый {% endfor %} diff --git a/myproject/products/urls.py b/myproject/products/urls.py index 54bab3d..100dce0 100644 --- a/myproject/products/urls.py +++ b/myproject/products/urls.py @@ -99,14 +99,14 @@ urlpatterns = [ path('api/attributes//values//delete/', views.delete_attribute_value_api, name='attribute-delete-value'), # CRUD URLs for ConfigurableProduct - path('configurable-kits/', views.ConfigurableProductListView.as_view(), name='configurablekit-list'), - path('configurable-kits/create/', views.ConfigurableProductCreateView.as_view(), name='configurablekit-create'), - path('configurable-kits//', views.ConfigurableProductDetailView.as_view(), name='configurablekit-detail'), - path('configurable-kits//update/', views.ConfigurableProductUpdateView.as_view(), name='configurablekit-update'), - path('configurable-kits//delete/', views.ConfigurableProductDeleteView.as_view(), name='configurablekit-delete'), - + path('configurable/', views.ConfigurableProductListView.as_view(), name='configurableproduct-list'), + path('configurable/create/', views.ConfigurableProductCreateView.as_view(), name='configurableproduct-create'), + path('configurable//', views.ConfigurableProductDetailView.as_view(), name='configurableproduct-detail'), + path('configurable//update/', views.ConfigurableProductUpdateView.as_view(), name='configurableproduct-update'), + path('configurable//delete/', views.ConfigurableProductDeleteView.as_view(), name='configurableproduct-delete'), + # API для управления вариантами ConfigurableProduct - path('configurable-kits//options/add/', views.add_option_to_configurable, name='configurablekit-add-option'), - path('configurable-kits//options//remove/', views.remove_option_from_configurable, name='configurablekit-remove-option'), - path('configurable-kits//options//set-default/', views.set_option_as_default, name='configurablekit-set-default-option'), + path('configurable//options/add/', views.add_option_to_configurable, name='configurableproduct-add-option'), + path('configurable//options//remove/', views.remove_option_from_configurable, name='configurableproduct-remove-option'), + path('configurable//options//set-default/', views.set_option_as_default, name='configurableproduct-set-default-option'), ] \ No newline at end of file diff --git a/myproject/products/views/configurableproduct_views.py b/myproject/products/views/configurableproduct_views.py index 69437e2..81abb03 100644 --- a/myproject/products/views/configurableproduct_views.py +++ b/myproject/products/views/configurableproduct_views.py @@ -69,7 +69,7 @@ class ConfigurableProductListView(LoginRequiredMixin, ManagerOwnerRequiredMixin, if self.request.user.has_perm('products.add_configurablekitproduct'): action_buttons.append({ - 'url': reverse_lazy('products:configurablekit-create'), + 'url': reverse_lazy('products:configurableproduct-create'), 'text': 'Создать вариативный товар', 'class': 'btn-primary', 'icon': 'plus-circle' @@ -373,7 +373,7 @@ class ConfigurableProductCreateView(LoginRequiredMixin, ManagerOwnerRequiredMixi return form.cleaned_data.get(deletion_field_name, False) def get_success_url(self): - return reverse_lazy('products:configurablekit-detail', kwargs={'pk': self.object.pk}) + return reverse_lazy('products:configurableproduct-detail', kwargs={'pk': self.object.pk}) class ConfigurableProductUpdateView(LoginRequiredMixin, ManagerOwnerRequiredMixin, UpdateView): @@ -650,13 +650,13 @@ class ConfigurableProductUpdateView(LoginRequiredMixin, ManagerOwnerRequiredMixi return form.cleaned_data.get(deletion_field_name, False) def get_success_url(self): - return reverse_lazy('products:configurablekit-detail', kwargs={'pk': self.object.pk}) + return reverse_lazy('products:configurableproduct-detail', kwargs={'pk': self.object.pk}) class ConfigurableProductDeleteView(LoginRequiredMixin, ManagerOwnerRequiredMixin, DeleteView): model = ConfigurableProduct template_name = 'products/configurableproduct_confirm_delete.html' - success_url = reverse_lazy('products:configurablekit-list') + success_url = reverse_lazy('products:configurableproduct-list') def form_valid(self, form): messages.success(self.request, f'Вариативный товар "{self.object.name}" успешно удалён!') diff --git a/myproject/templates/navbar.html b/myproject/templates/navbar.html index d4b9424..3424582 100644 --- a/myproject/templates/navbar.html +++ b/myproject/templates/navbar.html @@ -27,7 +27,7 @@