Commit 893f3b65 by Timothée Peignier

Merge pull request #204 from dnerdy/pipeline-extension-coffin-compatibility

Use context as dict instead of kwargs in PipelineExtension
parents d1dba257 788cacc9
...@@ -44,7 +44,7 @@ class PipelineExtension(CompressedMixin, Extension): ...@@ -44,7 +44,7 @@ class PipelineExtension(CompressedMixin, Extension):
'url': staticfiles_storage.url(path) 'url': staticfiles_storage.url(path)
}) })
template = self.environment.get_template(template_name) template = self.environment.get_template(template_name)
return template.render(**context) return template.render(context)
def render_individual_css(self, package, paths): def render_individual_css(self, package, paths):
tags = [self.render_css(package, path) for path in paths] tags = [self.render_css(package, path) for path in paths]
...@@ -65,7 +65,7 @@ class PipelineExtension(CompressedMixin, Extension): ...@@ -65,7 +65,7 @@ class PipelineExtension(CompressedMixin, Extension):
'url': staticfiles_storage.url(path) 'url': staticfiles_storage.url(path)
}) })
template = self.environment.get_template(template_name) template = self.environment.get_template(template_name)
return template.render(**context) return template.render(context)
def render_inline(self, package, js): def render_inline(self, package, js):
context = package.extra_context context = package.extra_context
...@@ -73,7 +73,7 @@ class PipelineExtension(CompressedMixin, Extension): ...@@ -73,7 +73,7 @@ class PipelineExtension(CompressedMixin, Extension):
'source': js 'source': js
}) })
template = self.environment.get_template("pipeline/inline_js.jinja") template = self.environment.get_template("pipeline/inline_js.jinja")
return template.render(**context) return template.render(context)
def render_individual_js(self, package, paths, templates=None): def render_individual_js(self, package, paths, templates=None):
tags = [self.render_js(package, js) for js in paths] tags = [self.render_js(package, js) for js in paths]
......
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