feat: wishlist view

This commit is contained in:
2025-01-02 12:17:24 +01:00
parent 7ef4d58ffa
commit 63f01db7ba
8 changed files with 118 additions and 7 deletions
+15 -2
View File
@@ -1,6 +1,12 @@
from django.urls import path
from web.views.components import cart, cart_dropdown, list_products, wishlist_button
from django.contrib.auth.decorators import login_required
from web.views.components import (
cart,
cart_dropdown,
list_products,
wishlist_button,
list_wishlisted_products,
)
from web.views.users import login, logout, my_account, register, reset_password
from web.views.web import (
add_cart_item,
@@ -12,12 +18,14 @@ from web.views.web import (
index,
manifest,
product_detail,
wishlist,
)
app_name = "web"
urlpatterns = [
path("", index, name="index"),
path("wishlist", login_required(wishlist, login_url="/login/"), name="wishlist"),
path("categories/<str:slug>/", category_view, name="category_view"),
path("products/<int:pk>/<str:slug>/", product_detail, name="product_detail"),
path("cart/", cart_detail, name="cart_detail"),
@@ -29,6 +37,11 @@ urlpatterns = [
path("my-account/", my_account, name="my_account"),
# components
path("web/components/products/", list_products, name="list_products"),
path(
"web/components/wishlist/",
list_wishlisted_products,
name="list_wishlisted_products",
),
path("web/components/cart-dropdown/", cart_dropdown, name="cart_dropdown"),
path("web/components/cart/", cart, name="cart"),
path(