X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/85b2f0f3f639c54c199162d07b7027ce3412c996..757ec785cad3a4559f1a9d21ec8d2c291f5cd1fe:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 168645009..fad77751e 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -246,10 +246,11 @@ def player(request, slug): else: have_oggs = False audiobooks.append(media) - print audiobooks projects = sorted(projects) + extra_info = book.get_extra_info_value() + return render_to_response('catalogue/player.html', locals(), context_instance=RequestContext(request)) @@ -558,10 +559,15 @@ class CustomPDFFormView(AjaxableFormView): from copy import copy if request.method == 'POST': request.GET = copy(request.GET) - request.GET['next'] = "%s?%s" % (reverse('catalogue.views.download_custom_pdf', args=[request.GET['slug']]), + request.GET['next'] = "%s?%s" % (reverse('catalogue.views.download_custom_pdf', args=[request.GET.get('slug')]), request.POST.urlencode()) return super(CustomPDFFormView, self).__call__(request) + def get_object(self, request): + return get_object_or_404(models.Book, slug=request.GET.get('slug')) + + def context_description(self, request, obj): + return obj.pretty_title() def success(self, *args): pass