From 59956d3232e614bfacb81c1e155cf1c013d9f5a2 Mon Sep 17 00:00:00 2001 From: Parsa Nazer <129178874+Greenstorm911@users.noreply.github.com> Date: Wed, 21 May 2025 18:56:31 +0330 Subject: [PATCH] Update urls.py --- backend/product/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/product/urls.py b/backend/product/urls.py index 20cf31d..e395827 100644 --- a/backend/product/urls.py +++ b/backend/product/urls.py @@ -1,4 +1,4 @@ -from django.urls import path +from django.urls import path, re_path from .views import AllCategories, ProductView, AllProductsView, CommentView, ShowCaseProductsView, ShowCaseCategoryListView urlpatterns = [ @@ -6,6 +6,6 @@ urlpatterns = [ path('categories', AllCategories.as_view(), name='all-categories'), path('slider_categories', ShowCaseCategoryListView.as_view(), name='all-categories'), path('comments/', CommentView.as_view(), name='comment-views'), - path('/', ProductView.as_view(), name='product-detail'), + re_path(r'^(?P[\u0600-\u06FF\s]+)/$', ProductView.as_view(), name='product-detail'), path('', AllProductsView.as_view(), name='category-products'), ] \ No newline at end of file