153 lines
4.0 KiB
Python
153 lines
4.0 KiB
Python
from django.urls import path, include
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
path('about/', views.AboutView.as_view(), name='about'),
|
|
path('fair-trade/', views.FairTradeView.as_view(), name='fair-trade'),
|
|
path('reviews/', views.ReviewListView.as_view(), name='reviews'),
|
|
path(
|
|
'terms-and-conditions/',
|
|
views.TermsAndConditionsView.as_view(),
|
|
name='terms-and-conditions'
|
|
),
|
|
path('privacy-policy/', views.PrivacyPolicyView.as_view(), name='privacy-policy'),
|
|
|
|
path(
|
|
'categories/<int:pk>/',
|
|
views.ProductCategoryDetailView.as_view(),
|
|
name='category-detail'
|
|
),
|
|
path('', views.ProductListView.as_view(), name='product-list'),
|
|
path('products/<int:pk>/', include([
|
|
path('', views.ProductDetailView.as_view(), name='product-detail'),
|
|
])),
|
|
|
|
path('cart/', views.CartView.as_view(), name='cart-detail'),
|
|
path(
|
|
'cart/<int:pk>/add/',
|
|
views.CartAddProductView.as_view(),
|
|
name='cart-add'
|
|
),
|
|
path(
|
|
'cart/<int:pk>/update/',
|
|
views.CartItemUpdateView.as_view(),
|
|
name='cart-update',
|
|
),
|
|
path(
|
|
'cart/<int:pk>/remove/',
|
|
views.cart_remove_product_view,
|
|
name='cart-remove',
|
|
),
|
|
path(
|
|
'coupon/apply/',
|
|
views.CouponApplyView.as_view(),
|
|
name='coupon-apply'
|
|
),
|
|
path(
|
|
'paypal/order/<slug:transaction_id>/capture/',
|
|
views.paypal_order_transaction_capture,
|
|
name='paypal-capture',
|
|
),
|
|
path(
|
|
'checkout/address/',
|
|
views.CheckoutAddressView.as_view(),
|
|
name='checkout-address',
|
|
),
|
|
path(
|
|
'checkout/shipping/',
|
|
views.CheckoutShippingView.as_view(),
|
|
name='checkout-shipping',
|
|
),
|
|
path(
|
|
'checkout/',
|
|
views.OrderCreateView.as_view(),
|
|
name='order-create'
|
|
),
|
|
path(
|
|
'checkout/free/',
|
|
views.FreeOrderCreateView.as_view(),
|
|
name='free-order-create'
|
|
),
|
|
path(
|
|
'done/',
|
|
views.PaymentDoneView.as_view(),
|
|
name='payment-done'
|
|
),
|
|
path(
|
|
'canceled/',
|
|
views.PaymentCanceledView.as_view(),
|
|
name='payment-canceled'
|
|
),
|
|
path('customers/<int:pk>/', include([
|
|
path(
|
|
'',
|
|
views.CustomerDetailView.as_view(),
|
|
name='customer-detail'
|
|
),
|
|
path(
|
|
'update/',
|
|
views.CustomerUpdateView.as_view(),
|
|
name='customer-update',
|
|
),
|
|
path(
|
|
'shipping-address/update/',
|
|
views.CustomerShippingAddressUpdateView.as_view(),
|
|
name='customer-shipping-address-update',
|
|
),
|
|
path(
|
|
'orders/<int:order_pk>/',
|
|
views.OrderDetailView.as_view(),
|
|
name='order-detail',
|
|
),
|
|
path('wholesale-orders/<int:order_pk>/', include([
|
|
path(
|
|
'',
|
|
views.WholesaleOrderDetailView.as_view(),
|
|
name='wholesale-order-detail'
|
|
),
|
|
])),
|
|
])),
|
|
|
|
path(
|
|
'stripe-webhook/',
|
|
views.stripe_webhook,
|
|
name='stripe-webhook'
|
|
),
|
|
# Subscriptions
|
|
path('subscriptions/', include([
|
|
path('', views.SubscriptionAdView.as_view(), name='subscription-ad'),
|
|
path(
|
|
'form/',
|
|
views.SubscriptionFormView.as_view(),
|
|
name='subscription-form'
|
|
),
|
|
path(
|
|
'address/',
|
|
views.SubscriptionAddAddressView.as_view(),
|
|
name='subscription-address'
|
|
),
|
|
path(
|
|
'new/',
|
|
views.SubscriptionCreateView.as_view(),
|
|
name='subscription-create'
|
|
),
|
|
path(
|
|
'done/',
|
|
views.SubscriptionDoneView.as_view(),
|
|
name='subscription-done'
|
|
),
|
|
])),
|
|
|
|
# Wholesale Orders
|
|
path(
|
|
'wholesale-orders/',
|
|
views.WholesaleOrderView.as_view(),
|
|
name='wholesale-order'
|
|
),
|
|
path(
|
|
'wholesale-orders/new/',
|
|
views.WholesaleOrderCreateView.as_view(),
|
|
name='wholesale-order-create'
|
|
),
|
|
]
|