From 41f37d0a6f3226da02fdc75723c365cc49cd6f19 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 31 Jul 2017 13:36:06 -0700 Subject: [PATCH] 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. --- templates/tests/test_markdown.html | 2 +- templates/zerver/for-open-source.html | 2 +- templates/zerver/help/main.html | 4 ++-- templates/zerver/privacy.html | 2 +- templates/zerver/terms.html | 2 +- templates/zerver/why-zulip.html | 2 +- zproject/jinja2/__init__.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/tests/test_markdown.html b/templates/tests/test_markdown.html index 3cef4e13f1..c8c71d9112 100644 --- a/templates/tests/test_markdown.html +++ b/templates/tests/test_markdown.html @@ -1,5 +1,5 @@ header -{{ markdown_test_file|render_markdown_path }} +{{ render_markdown_path(markdown_test_file) }} footer diff --git a/templates/zerver/for-open-source.html b/templates/zerver/for-open-source.html index beafb3659b..bd35df02d2 100644 --- a/templates/zerver/for-open-source.html +++ b/templates/zerver/for-open-source.html @@ -27,7 +27,7 @@
- {{ 'zerver/for/open-source.md'|render_markdown_path }} + {{ render_markdown_path('zerver/for/open-source.md') }}
diff --git a/templates/zerver/help/main.html b/templates/zerver/help/main.html index 015c273107..ea6fdc00e4 100644 --- a/templates/zerver/help/main.html +++ b/templates/zerver/help/main.html @@ -5,14 +5,14 @@ {% block portico_content %}
- {{ article|render_markdown_path }} + {{ render_markdown_path(article) }}