Environment added.
This commit is contained in:
parent
3a07ed173e
commit
3e91e33d40
@ -83,8 +83,8 @@ class TemplateView(BaseView):
|
|||||||
"<body>{% markdown %}"+content+"{% endmarkdown %}</body>",
|
"<body>{% markdown %}"+content+"{% endmarkdown %}</body>",
|
||||||
"</html>"
|
"</html>"
|
||||||
])
|
])
|
||||||
self.request.app.jinja2_env.globals["request"] = self.request
|
self.request.app.jinja2_env["request"] = self.request
|
||||||
aelf.request.app.jinja2_env.globals["context"] = context
|
aelf.request.app.jinja2_env["context"] = context
|
||||||
with open(".temp.html", "w+") as f:
|
with open(".temp.html", "w+") as f:
|
||||||
f.write(markdown_default_page)
|
f.write(markdown_default_page)
|
||||||
content = aiohttp_jinja2.render_string(".temp.html",self.request,context=context)
|
content = aiohttp_jinja2.render_string(".temp.html",self.request,context=context)
|
||||||
|
Loading…
Reference in New Issue
Block a user