feat: cart
This commit is contained in:
+8
-2
@@ -1,6 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from web.views import index, list_products, product_detail
|
||||
from web.views import index, product_detail, add_cart_item, delete_cart_item
|
||||
from web.components.views import list_products, cart_dropdown
|
||||
|
||||
app_name = "web"
|
||||
|
||||
@@ -8,5 +9,10 @@ app_name = "web"
|
||||
urlpatterns = [
|
||||
path("", index, name="index"),
|
||||
path("products/<int:pk>/<str:slug>/", product_detail, name="product_detail"),
|
||||
path("shop/components/products/", list_products, name="list_products"),
|
||||
# components
|
||||
path("web/components/products/", list_products, name="list_products"),
|
||||
path("web/components/cart-dropdown/", cart_dropdown, name="cart_dropdown"),
|
||||
# api
|
||||
path("web/add-cart-item/", add_cart_item, name="add_cart_item"),
|
||||
path("web/delete-cart-item/<int:pk>/", delete_cart_item, name="delete_cart_item"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user