X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/dab276bc0a4bdb890d7a356db21abf40fe7311bb..ab47432c3b01145efcad2c2de1c945e9a3a1822b:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index e71b3495..3d1a47f3 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -207,7 +207,7 @@ def upload(request): def serve_xml(request, book, slug): if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - xml = book.materialize() + xml = book.materialize(publishable=True) response = http.HttpResponse(xml, content_type='application/xml') response['Content-Disposition'] = 'attachment; filename=%s.xml' % slug return response @@ -571,7 +571,7 @@ def publish(request, slug): except NotAuthorizedError: return http.HttpResponseRedirect(reverse('apiclient_oauth')) except BaseException, e: - return http.HttpResponse(e) + return http.HttpResponse(repr(e)) else: return http.HttpResponseRedirect(book.get_absolute_url())