aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/payments
diff options
context:
space:
mode:
Diffstat (limited to 'pyblackbird_cc/payments')
-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})