Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
templates: Narrow the type of jinjia to Jinja2.
Zixuan James Li90a31d9e66d2
diff --git a/zerver/lib/templates.py b/zerver/lib/templates.pyindex ba11237c329..d2f3ca7a95a 100644--- a/zerver/lib/templates.py+++ b/zerver/lib/templates.py@@ -10,6 +10,7 @@ import orjsonfrom django.conf import settingsfrom django.contrib.staticfiles.storage import staticfiles_storagefrom django.template import Library, engines+from django.template.backends.jinja2 import Jinja2from django.utils.safestring import mark_safefrom jinja2.exceptions import TemplateNotFound@@ -156,6 +157,7 @@ def render_markdown_path(# By default, we do both Jinja2 templating and Markdown# processing on the file, to make it easy to use both Jinja2# context variables and markdown includes in the file.+ assert isinstance(jinja, Jinja2)markdown_string = jinja.env.loader.get_source(jinja.env, markdown_file_path)[0]except TemplateNotFound as e:if pure_markdown: