41 lines
2.7 KiB
Python
41 lines
2.7 KiB
Python
from django.urls import path
|
|
from apps.shop.views import *
|
|
|
|
urlpatterns = [
|
|
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'),
|
|
]
|