feat: added tests for delete cart items
This commit is contained in:
@@ -26,9 +26,13 @@ class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
|
||||
def cart_dropdown(request, *args, **kwargs):
|
||||
cart, created = get_or_create_cart(request)
|
||||
|
||||
response = render(request, "components/cart/cart_navbar.html", context={
|
||||
"cart": cart,
|
||||
})
|
||||
response = render(
|
||||
request,
|
||||
"components/cart/cart_navbar.html",
|
||||
context={
|
||||
"cart": cart,
|
||||
},
|
||||
)
|
||||
|
||||
if not request.user.is_authenticated:
|
||||
response.set_cookie(ANONYMOUS_CART_ID_COOKIE_NAME, cart.uuid)
|
||||
|
||||
Reference in New Issue
Block a user