from catalogue.ebook_utils import serve_file
return serve_file(pdf_file.get_filename(),
book.slug + '.pdf', 'application/pdf')
from catalogue.ebook_utils import serve_file
return serve_file(pdf_file.get_filename(),
book.slug + '.pdf', 'application/pdf')
response = HttpResponse(mimetype='application/epub+zip')
response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.epub'
response.write(epub)
response = HttpResponse(mimetype='application/epub+zip')
response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.epub'
response.write(epub)