Commit 987d7bcc by kimth

book_url doesn't come from settings

parent 6a05a812
from django.conf import settings
from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response
......@@ -13,8 +14,10 @@ def index(request, course_id, book_index, page=0):
textbook = course.textbooks[int(book_index)]
table_of_contents = textbook.table_of_contents
book_url = settings.BOOK_URL
return render_to_response('staticbook.html',
{'page': int(page), 'course': course,
{'page': int(page), 'course': course, 'book_url': book_url,
'table_of_contents': table_of_contents,
'staff_access': staff_access})
......
......@@ -32,7 +32,7 @@ function goto_page(n) {
if(n<10) {
prefix="00";
}
$("#bookpage").attr("src","${ settings.BOOK_URL }p"+prefix+n+".png");
$("#bookpage").attr("src","${ book_url }p"+prefix+n+".png");
$.cookie("book_page", n, {'expires':3650, 'path':'/'});
};
......@@ -113,7 +113,7 @@ $("#open_close_accordion a").click(function(){
</ul>
</nav>
<img id="bookpage" src="${ settings.BOOK_URL }p${ "%03i"%(page) }.png">
<img id="bookpage" src="${ book_url }p${ "%03i"%(page) }.png">
</section>
</section>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment