Files
hossein-por-shop/backend/order/urls.py
T
Parsa Nazer 337e0723a8 torob
2026-05-18 14:26:00 +03:30

28 lines
1.3 KiB
Python

from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from .views import *
from .torob_api import TorobOrderTrackingView
urlpatterns = [
path('torob/v1/orders', TorobOrderTrackingView.as_view(), name='torob-order-tracking'),
path('all', OrderlistView.as_view(), name='order-list'),
path('cart', CartView.as_view()),
path('cart/set-address', SetAddressForCartView.as_view()),
path('cart/discount', ApplyDiscountView.as_view()),
path('cart/special-discount', ApplySpecialDiscountView.as_view()),
path('cart/all', CartItemClear.as_view()),
path('cart/item/<int:pk>', CartItemViews.as_view(), name='change-item-cart'),
path('cart/payment', PaymentView.as_view(), name='payment'),
path('transaction/<int:tracking_code>',
CallbackView.as_view(), name='callback-gateway'),
path('<int:pk>', OrderGetView.as_view(), name='order-get'),
# User invoice download endpoint (DRF APIView)
path('invoice/<int:order_id>', UserOrderInvoiceView.as_view(), name='user-order-invoice'),
# Admin invoice download endpoints
path('invoice/order/<int:order_id>/download', download_order_invoice, name='download-order-invoice'),
path('invoice/shop-order/<int:shop_order_id>/download', download_shop_order_invoice, name='download-shop-order-invoice'),
]