return to order details after adding product to order

This commit is contained in:
Thomas Steen Rasmussen 2016-05-16 17:17:14 +02:00
parent a49168e95c
commit 2e079732cf

View file

@ -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):