mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 00:05:03 -04:00
Replace username picker with a template (#9275)
There's some prelimiary work here to pull out the construction of a jinja environment to a separate function. I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
This commit is contained in:
parent
8aed29dc61
commit
4167494c90
15 changed files with 429 additions and 204 deletions
|
@ -100,6 +100,7 @@ class ConsentResource(DirectServeHtmlResource):
|
|||
|
||||
consent_template_directory = hs.config.user_consent_template_dir
|
||||
|
||||
# TODO: switch to synapse.util.templates.build_jinja_env
|
||||
loader = jinja2.FileSystemLoader(consent_template_directory)
|
||||
self._jinja_env = jinja2.Environment(
|
||||
loader=loader, autoescape=jinja2.select_autoescape(["html", "htm", "xml"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue