Files
shoppy/backoffice/urls/products.py
T
2026-07-23 16:19:19 +02:00

80 lines
4.0 KiB
Python

from django.urls import path
from backoffice.views import products
urlpatterns = [
path('', products.ProductListView.as_view(), name='product_list'),
path('create/', products.ProductCreateView.as_view(), name='product_create'),
path('<int:pk>/', products.ProductDetailView.as_view(), name='product_detail'),
path('<int:pk>/delete/', products.ProductDeleteView.as_view(), name='product_delete'),
path(
'<int:pk>/inline/<str:field_name>/',
products.ProductInlineViewFragment.as_view(),
name='product_inline_view',
),
path(
'<int:pk>/inline/<str:field_name>/edit/',
products.ProductInlineEditView.as_view(),
name='product_inline_edit',
),
path(
'inline-search/<str:field_name>/',
products.ProductFieldSearchView.as_view(),
name='product_field_search',
),
path('<int:product_pk>/prices/create/', products.ProductPriceCreateView.as_view(), name='product_price_create'),
path(
'<int:product_pk>/variants/create/',
products.ProductVariantCreateView.as_view(),
name='product_variant_create',
),
path('variants/<int:pk>/edit/', products.ProductVariantUpdateView.as_view(), name='product_variant_update'),
path('variants/<int:pk>/delete/', products.ProductVariantDeleteView.as_view(), name='product_variant_delete'),
path(
'variants/<int:variant_pk>/prices/create/',
products.ProductVariantPriceCreateView.as_view(),
name='product_variant_price_create',
),
path('<int:product_pk>/batches/create/', products.ProductBatchCreateView.as_view(), name='product_batch_create'),
path('batches/<int:pk>/delete/', products.ProductBatchDeleteView.as_view(), name='product_batch_delete'),
path('<int:product_pk>/images/create/', products.ProductImageCreateView.as_view(), name='product_image_create'),
path('images/<int:pk>/delete/', products.ProductImageDeleteView.as_view(), name='product_image_delete'),
path('categories/', products.ProductCategoryListView.as_view(), name='product_category_list'),
path('categories/create/', products.ProductCategoryCreateView.as_view(), name='product_category_create'),
path(
'categories/<int:pk>/edit/', products.ProductCategoryUpdateView.as_view(), name='product_category_update'
),
path(
'categories/<int:pk>/delete/', products.ProductCategoryDeleteView.as_view(), name='product_category_delete'
),
path('attributes/', products.ProductAttributeListView.as_view(), name='product_attribute_list'),
path('attributes/create/', products.ProductAttributeCreateView.as_view(), name='product_attribute_create'),
path('attributes/<int:pk>/', products.ProductAttributeDetailView.as_view(), name='product_attribute_detail'),
path(
'attributes/<int:pk>/edit/', products.ProductAttributeUpdateView.as_view(), name='product_attribute_update'
),
path(
'attributes/<int:pk>/delete/',
products.ProductAttributeDeleteView.as_view(),
name='product_attribute_delete',
),
path(
'attributes/<int:attribute_pk>/values/create/',
products.ProductAttributeValueCreateView.as_view(),
name='product_attribute_value_create',
),
path(
'attributes/values/<int:pk>/delete/',
products.ProductAttributeValueDeleteView.as_view(),
name='product_attribute_value_delete',
),
path('brands/', products.BrandListView.as_view(), name='brand_list'),
path('brands/create/', products.BrandCreateView.as_view(), name='brand_create'),
path('brands/<int:pk>/edit/', products.BrandUpdateView.as_view(), name='brand_update'),
path('brands/<int:pk>/delete/', products.BrandDeleteView.as_view(), name='brand_delete'),
path('tags/', products.TagListView.as_view(), name='tag_list'),
path('tags/create/', products.TagCreateView.as_view(), name='tag_create'),
path('tags/<int:pk>/edit/', products.TagUpdateView.as_view(), name='tag_update'),
path('tags/<int:pk>/delete/', products.TagDeleteView.as_view(), name='tag_delete'),
]