aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-22 08:45:39 +0100
committerMatthew Lemon <y@yulqen.org>2024-09-22 08:45:39 +0100
commite74ff1d9a39c471ef8dca34732319e1361263ff9 (patch)
tree9c1182a0ca662c72846c5b0d1d0e0893d6b2a449
parent6b563f40e661d66a703790018b33a749a1828c8d (diff)
very minor format changes
-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 01400bb..40c2380 100644
--- a/pyblackbird_cc/payments/views.py
+++ b/pyblackbird_cc/payments/views.py
@@ -17,8 +17,6 @@ from .models import ShoppingCart
stripe.api_key = settings.STRIPE_SECRET_KEY
-
-
class CreateCheckoutSessionView(View):
def post(self, request, *args, **kwargs):
price = Price.objects.get(id=self.kwargs["pk"])
@@ -66,11 +64,13 @@ def add_to_cart(request, resource_id):
cart_item.save()
return redirect("cart_detail")
+
@login_required
def cart_detail(request):
cart, created = ShoppingCart.objects.get_or_create(user=request.user)
return render(request, "payments/cart_detail.html", {"cart": cart})
+
# def cart_detail(request):
# cart, created = ShoppingCart.objects.get_or_create(user=request.user)
# return render(request, "payments/cart_detail.html", {"cart": cart})