gault-millau/apps/product/urls/back.py
2019-11-13 14:46:30 +03:00

25 lines
1.2 KiB
Python

"""Product backoffice url patterns."""
from django.urls import path
from product import views
urlpatterns = [
path('', views.ProductListCreateBackOfficeView.as_view(), name='list-create'),
path('<int:pk>/', views.ProductDetailBackOfficeView.as_view(), name='rud'),
path('<int:pk>/gallery/', views.ProductBackOfficeGalleryListView.as_view(),
name='gallery-list'),
path('<int:pk>/gallery/<int:image_id>/', views.ProductBackOfficeGalleryCreateDestroyView.as_view(),
name='gallery-create-destroy'),
# product types
path('types/', views.ProductTypeListCreateBackOfficeView.as_view(), name='type-list-create'),
path('types/<int:pk>/', views.ProductTypeRUDBackOfficeView.as_view(),
name='type-retrieve-update-destroy'),
path('types/attach-tag-category/', views.ProductTypeTagCategoryCreateBackOfficeView.as_view(),
name='type-tag-category-create'),
# product sub types
path('subtypes/', views.ProductSubTypeListCreateBackOfficeView.as_view(),
name='subtype-list-create'),
path('subtypes/<int:pk>/', views.ProductSubTypeRUDBackOfficeView.as_view(),
name='subtype-retrieve-update-destroy'),
]