Files
crmApi/apps/shop/urls.py
T
2026-10-08 16:37:45 +03:30

59 lines
3.8 KiB
Python

from django.urls import path
from apps.shop.views import *
from apps.shop.views.management import (
ProductManagementListApi, ProductManagementDetailApi, CategoryManagementListApi,
CategoryManagementDetailApi, ProductBulkApi, ProductExportApi,
ProductImportPreviewApi, ProductImportListApi, ProductImportDetailApi,
ProductImportConfirmApi, ProductImportReportApi, ProductImportTemplateApi,
)
urlpatterns = [
path('manage/products/', ProductManagementListApi.as_view()),
path('manage/products/bulk/', ProductBulkApi.as_view()),
path('manage/products/export/', ProductExportApi.as_view()),
path('manage/products/<int:pk>/', ProductManagementDetailApi.as_view()),
path('manage/categories/', CategoryManagementListApi.as_view()),
path('manage/categories/<int:pk>/', CategoryManagementDetailApi.as_view()),
path('manage/import/preview/', ProductImportPreviewApi.as_view()),
path('manage/import/template/', ProductImportTemplateApi.as_view()),
path('manage/imports/', ProductImportListApi.as_view()),
path('manage/imports/<int:pk>/', ProductImportDetailApi.as_view()),
path('manage/imports/<int:pk>/confirm/', ProductImportConfirmApi.as_view()),
path('manage/imports/<int:pk>/report/', ProductImportReportApi.as_view()),
path('product-category/create/', ProductCategoryCreateApi.as_view(), name='create_product_category'),
path('product-category/<int:category_id>/', ProductCategoryRetrieveApi.as_view(), name='retrieve_product_category'),
path('product-category/update/<int:category_id>/', ProductCategoryUpdateApi.as_view(), name='update_product_category'),
path('product-category/delete/<int:category_id>/', ProductCategoryDeleteApi.as_view(), name='delete_product_category'),
path('product-category/list/', ProductCategoryListApi.as_view(), name='list_product_category'),
path('v2/product-category/list/', ProductsCategoryApi.as_view(), name='v2_list_product_category'),
path('product/create/', ProductCreateApi.as_view(), name='create_product'),
path('product/<int:product_id>/', ProductRetrieveApi.as_view(), name='retrieve_product'),
path('product/update/<int:product_id>/', ProductUpdateApi.as_view(), name='update_product'),
path('product/delete/<int:product_id>/', ProductDeleteApi.as_view(), name='delete_product'),
path('product/list/', ProductListApi.as_view(), name='list_product'),
path('product/list/<int:category_id>/', ProductListCategoryApi.as_view(), name='list_product_by_category'),
path('order/create/', OrderCreateApi.as_view(), name='create_order'),
path('order-and-item/create/', OrderAndItemCreateApi.as_view(), name='create_order_and_items'),
path('order/<int:order_id>/', OrderRetrieveApi.as_view(), name='retrieve_order'),
path('order/update/<int:order_id>/', OrderUpdateApi.as_view(), name='update_order'),
path('order/delete/<int:order_id>/', OrderDeleteApi.as_view(), name='delete_order'),
path('order/list/', OrderListApi.as_view(), name='list_order'),
path('order/list-operator/', OrderListOperatorApi.as_view(), name='list_order_operator'),
path('order/<int:order_id>/operator/', OrderRetrieveOperatorApi.as_view(), name='order_retrieve_operator'),
path('order/<int:order_id>/operator/excel/', OrderRetrieveOperatorExcelApi.as_view(), name='order_retrieve_operator_excel'),
path('order/iteams/list/<int:order_id>/', OrderItemsListApi.as_view(), name='list_order_items'),
path('cart/', CartListApi.as_view(), name='list_cart'),
path('cart/add/', CartCreateApi.as_view(), name='add_cart'),
path('cart/delete/<int:cart_id>/', CartDeleteApi.as_view(), name='delete_cart'),
path('import/', ImportExcelView.as_view(), name='import_excel'),
path('import/customer/', ImportExcelCustomersView.as_view(), name='import_excel_customer'),
#path('import/city/', ImportExcelCitysView.as_view(), name='import_excel_city'),
]