urls based on frontend desires

This commit is contained in:
AmirHossein Shirazi
2024-12-13 11:20:31 +03:30
parent 245f31f546
commit cabd3517ac
+5 -5
View File
@@ -2,9 +2,9 @@ from django.urls import path
from .views import AllCategories, ProductView, AllProductsView, CommentView
urlpatterns = [
path('categories/', AllCategories.as_view(), name='all-categories'),
path('products/<int:pk>/', ProductView.as_view(), name='product-detail'),
path('categories/<int:pk>/products/', AllProductsView.as_view(), name='category-products'),
path('products/<int:pk>/comments/', CommentView.as_view(), name='product-comments'),
path('comments/<int:pk>/', CommentView.as_view(), name='comment-delete'),
path('categories', AllCategories.as_view(), name='all-categories'),
path('products/<int:pk>', ProductView.as_view(), name='product-detail'),
path('categories/products', AllProductsView.as_view(), name='category-products'),
path('products/<int:pk>/comments', CommentView.as_view(), name='product-comments'),
path('comments/<int:pk>', CommentView.as_view(), name='comment-delete'),
]