Skip to content

Commit

Permalink
Add request to render_to_string call.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephrdev committed Apr 16, 2020
1 parent d250295 commit 2c056b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

0.0.2 (2020-04-16)
------------------

* Pass request to render_to_string


0.0.1 (2018-08-08)
------------------

Expand Down
3 changes: 2 additions & 1 deletion static_templates/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def render_template(self):
self.log('Rendering template "{0}"'.format(template_name))
return render_to_string(
template_name,
RequestContext(request, self.get_template_context()).flatten()
context=RequestContext(request, self.get_template_context()).flatten(),
request=request,
)

def get_static_file_path(self):
Expand Down

0 comments on commit 2c056b1

Please sign in to comment.