jinja2: Use function interface for render_markdown_path.

Apparently, the filters implementation was doing some sort of strange
caching, where you would need to restart the server in order to
refresh for changes to the markdown content.

We fix this by switching to just calling the render_markdown_path
function from Jinja2.

Fixes #5974.
This commit is contained in:
Tim Abbott
2017-07-31 13:36:06 -07:00
parent a9fa1a5527
commit 41f37d0a6f
7 changed files with 8 additions and 8 deletions

View File

@@ -20,6 +20,7 @@ def environment(**options):
env.globals.update({
'static': staticfiles_storage.url,
'url': reverse,
'render_markdown_path': render_markdown_path,
'minified_js': minified_js,
})
@@ -28,6 +29,5 @@ def environment(**options):
env.filters['slugify'] = slugify
env.filters['pluralize'] = pluralize
env.filters['display_list'] = display_list
env.filters['render_markdown_path'] = render_markdown_path
return env