def get(self, request): cart = Cart(request) promocode = cart.set_promocode(None) return redirect('cart')
def get(self, request): code = request.GET.get('promocode') cart = Cart(request) promocode = cart.set_promocode(code) return redirect('cart')