Fix static urls in pdf_viewer.html to correctly display pdf viewer for course text books

This commit is contained in:
danial
2018-12-13 17:38:51 +05:00
committed by danialmalik
parent 559069d5d2
commit ea53c3922d
2 changed files with 12 additions and 15 deletions

View File

@@ -31,10 +31,7 @@ logger = logging.getLogger(__name__)
%></%def>
<%def name='url(file, raw=False)'><%
try:
url = staticfiles_storage.url(file)
except:
url = file
url = staticfiles_storage.url(file)
## HTML-escaping must be handled by caller
%>${url | n, decode.utf8}${"?raw" if raw else ""}</%def>