mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-03 16:14:15 -04:00
Centralise the custom template directory (#10596)
Several configuration sections are using separate settings for custom template directories, which can be confusing. This PR adds a new top-level configuration for a custom template directory which is then used for every module. The only exception is the consent templates, since the consent template directory require a specific hierarchy, so it's probably better that it stays separate from everything else.
This commit is contained in:
parent
c4cf0c0473
commit
5639759980
12 changed files with 342 additions and 418 deletions
|
@ -46,6 +46,8 @@ class NewUserConsentResource(DirectServeHtmlResource):
|
|||
self._consent_version = hs.config.consent.user_consent_version
|
||||
|
||||
def template_search_dirs():
|
||||
if hs.config.server.custom_template_directory:
|
||||
yield hs.config.server.custom_template_directory
|
||||
if hs.config.sso.sso_template_dir:
|
||||
yield hs.config.sso.sso_template_dir
|
||||
yield hs.config.sso.default_template_dir
|
||||
|
|
|
@ -74,6 +74,8 @@ class AccountDetailsResource(DirectServeHtmlResource):
|
|||
self._sso_handler = hs.get_sso_handler()
|
||||
|
||||
def template_search_dirs():
|
||||
if hs.config.server.custom_template_directory:
|
||||
yield hs.config.server.custom_template_directory
|
||||
if hs.config.sso.sso_template_dir:
|
||||
yield hs.config.sso.sso_template_dir
|
||||
yield hs.config.sso.default_template_dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue