From 2e079732cf8b15f541d51fa19c7e72d90997f177 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 16 May 2016 17:17:14 +0200 Subject: [PATCH] return to order details after adding product to order --- shop/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shop/views.py b/shop/views.py index 9a4d3e46..07b153df 100644 --- a/shop/views.py +++ b/shop/views.py @@ -163,10 +163,7 @@ class ProductDetailView(LoginRequiredMixin, FormView, DetailView): return super(ProductDetailView, self).form_valid(form) def get_success_url(self): - return reverse_lazy( - 'shop:product_detail', - kwargs={'slug': self.get_object().slug} - ) + return Order.objects.get(user=self.request.user, open__isnull=False).get_absolute_url() class CoinifyRedirectView(TemplateView):