def render_js(self, package, path):
template_name = package.template_name or "pipeline/js_default.html"
modified = staticfiles_storage.modified_time(path).timestamp()
context = package.extra_context
context.update({
'type': guess_type(path, 'text/javascript'),
'url': mark_safe(staticfiles_storage.url(path)),
'modified': int(modified),
})
return loader.render_to_string(template_name, context)
评论列表
文章目录