mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:45:01 -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
|
@ -78,6 +78,11 @@ class AccountValidityConfig(Config):
|
|||
)
|
||||
|
||||
# Read and store template content
|
||||
custom_template_directories = (
|
||||
self.root.server.custom_template_directory,
|
||||
account_validity_template_dir,
|
||||
)
|
||||
|
||||
(
|
||||
self.account_validity_account_renewed_template,
|
||||
self.account_validity_account_previously_renewed_template,
|
||||
|
@ -88,5 +93,5 @@ class AccountValidityConfig(Config):
|
|||
"account_previously_renewed.html",
|
||||
invalid_token_template_filename,
|
||||
],
|
||||
(td for td in (account_validity_template_dir,) if td),
|
||||
(td for td in custom_template_directories if td),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue