get reader in a working state

foundation/reader
nicholas antonov 2018-03-27 15:27:02 -04:00
parent 1bec7f0ea4
commit 825e682a17
2 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,7 @@
EPUBJS.cssPath = window.location.href.replace(window.location.hash, '').replace('index.html', '') + "css/";
// fileStorage.filePath = EPUBJS.filePath;
window.reader = ePubReader("https://unglue.it/download_ebook/30881/", {restore: true});
window.reader = ePubReader("{{url}}", {restore: true});
}
};
</script>

View File

@ -298,8 +298,13 @@ def acks(request, work):
return render(request, 'front_matter.html', {'campaign': work.last_campaign()})
def read(request, work_id):
try:
ebook = get_object_or_404(models.Ebook, id=work_id)
except ValueError:
raise Http404
return render(request, 'read.html', {
'work': safe_get_work(work_id),
'url': ebook.url,
})
def work(request, work_id, action='display'):