complete base of product and categories

This commit is contained in:
AmirHossein Shirazi
2024-12-12 22:53:05 +03:30
parent 907a115e3e
commit 40945fdaa8
4 changed files with 112 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
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'),
]