47 lines
2.3 KiB
Python
47 lines
2.3 KiB
Python
from django.urls import path
|
|
from .views import (
|
|
ProductListView, ProductDetailView,
|
|
add_to_cart, cart_detail, update_cart_item,
|
|
remove_from_cart, create_order, checkout,
|
|
add_review, profile_view, order_history,
|
|
wishlist_view, add_to_wishlist, remove_from_wishlist,
|
|
faq_list, contact, contact_success,
|
|
custom_order, custom_order_success,
|
|
custom_order_detail, gallery,
|
|
add_progress_update,
|
|
payment_process,
|
|
payment_success,
|
|
payment_failed,
|
|
register
|
|
)
|
|
|
|
app_name = 'products'
|
|
|
|
urlpatterns = [
|
|
path('', ProductListView.as_view(), name='product_list'),
|
|
path('product/<int:pk>/', ProductDetailView.as_view(), name='product_detail'),
|
|
path('cart/add/<int:product_id>/', add_to_cart, name='add_to_cart'),
|
|
path('cart/', cart_detail, name='cart_detail'),
|
|
path('cart/update/<int:item_id>/', update_cart_item, name='update_cart_item'),
|
|
path('cart/remove/<int:item_id>/', remove_from_cart, name='remove_from_cart'),
|
|
path('order/create/', create_order, name='create_order'),
|
|
path('checkout/<int:order_id>/', checkout, name='checkout'),
|
|
path('product/<int:product_id>/review/', add_review, name='add_review'),
|
|
path('profile/', profile_view, name='profile'),
|
|
path('orders/', order_history, name='order_history'),
|
|
path('wishlist/', wishlist_view, name='wishlist'),
|
|
path('wishlist/add/<int:product_id>/', add_to_wishlist, name='add_to_wishlist'),
|
|
path('wishlist/remove/<int:product_id>/', remove_from_wishlist, name='remove_from_wishlist'),
|
|
path('faq/', faq_list, name='faq'),
|
|
path('contact/', contact, name='contact'),
|
|
path('contact/success/', contact_success, name='contact_success'),
|
|
path('custom-order/', custom_order, name='custom_order'),
|
|
path('custom-order/success/<int:order_id>/', custom_order_success, name='custom_order_success'),
|
|
path('custom-orders/<int:order_id>/', custom_order_detail, name='custom_order_detail'),
|
|
path('custom-orders/<int:order_id>/update/', add_progress_update, name='add_progress_update'),
|
|
path('gallery/', gallery, name='gallery'),
|
|
path('payment/process/<int:order_id>/', payment_process, name='payment_process'),
|
|
path('payment/success/<int:order_id>/', payment_success, name='payment_success'),
|
|
path('payment/failed/<int:order_id>/', payment_failed, name='payment_failed'),
|
|
path('register/', register, name='register'),
|
|
] |