aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/payments/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-10-09 17:34:23 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-09 17:34:23 +0100
commit52240b9a0c9efaf0d092bfb029b6ca7e74442217 (patch)
tree25a45dc7b01196a5b0091aaabd95862373ebc68e /pyblackbird_cc/payments/views.py
parent677c935fdc3b083a9940a1b2f280cb1ccdbc03bd (diff)
wip: clicking add to cart button takes you to card detail but thats it
Diffstat (limited to '')
-rw-r--r--pyblackbird_cc/payments/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyblackbird_cc/payments/views.py b/pyblackbird_cc/payments/views.py
index 6863869..6ca31d8 100644
--- a/pyblackbird_cc/payments/views.py
+++ b/pyblackbird_cc/payments/views.py
@@ -55,9 +55,9 @@ def add_to_cart(request, resource_id):
resource = get_object_or_404(Resource, id=resource_id)
cart, created = ShoppingCart.objects.get_or_create(user=request.user)
cart_item, created = CartItem.objects.get_or_create(cart=cart, resource=resource)
- cart_item.quantity += 1
+ # cart_item.quantity += 1
cart_item.save()
- return redirect("cart_detail")
+ return render(request, "payments/cart_detail.html", {"cart": cart})
@login_required