21 lines
750 B
Python
21 lines
750 B
Python
"""Product url patterns."""
|
|
from django.urls import path
|
|
|
|
from product import views
|
|
|
|
app_name = 'product'
|
|
|
|
urlpatterns = [
|
|
path('', views.ProductListView.as_view(), name='list'),
|
|
path('slug/<slug:slug>/', views.ProductDetailView.as_view(), name='detail'),
|
|
path('slug/<slug:slug>/favorites/', views.CreateFavoriteProductView.as_view(),
|
|
name='create-destroy-favorites'),
|
|
path('slug/<slug:slug>/comments/', views.ProductCommentListView.as_view(),
|
|
name='list-comments'),
|
|
path('slug/<slug:slug>/comments/create/', views.ProductCommentCreateView.as_view(),
|
|
name='create-comment'),
|
|
path('slug/<slug:slug>/comments/<int:comment_id>/', views.ProductCommentRUDView.as_view(),
|
|
name='rud-comment'),
|
|
|
|
]
|