X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/02b46ac5bb9ae5301e4764b9c111c971aa86b333..e7ef95e5867bba96cb445fef0d8932ab5ed6c938:/apps/catalogue/views.py?ds=inline diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index b874c4c0a..34c9c1f1f 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -730,7 +730,13 @@ class CustomPDFFormView(AjaxableFormView): submit = _('Download') def __call__(self, request): + from copy import copy if request.method == 'POST': - return download_custom_pdf(request, request.GET['book_id'], method='POST') - else: - return super(CustomPDFFormView, self).__call__(request) + request.GET = copy(request.GET) + request.GET['next'] = "%s?%s" % (reverse('catalogue.views.download_custom_pdf', args=[request.GET['slug']]), + request.POST.urlencode()) + return super(CustomPDFFormView, self).__call__(request) + + + def success(self, *args): + pass