This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use the default templates when a custom template file cannot be found #8037
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
3d4f917
Remove conditional requirement for already required Jinja2
anoadragon453 0046454
Create a generic function to read jinja2 templates
anoadragon453 4ace21a
Switch saml2_config to use read_templates
anoadragon453 e3c75b1
Change create_mxc_to_http_filter to public function
anoadragon453 dd81441
Update synapse/push/pusher.py to use read_templates
anoadragon453 15f5aa0
Convert synapse/handlers/auth.py to use read_templates
anoadragon453 6f9e4b0
Convert synapse/handlers/account_validity.py to use read_templates
anoadragon453 e1ba6be
Convert synapse/handlers/oidc_handler.py to use read_templates
anoadragon453 44dc4aa
Convert synapse/rest/client/v2_alpha/account.py to use read_templates
anoadragon453 c8f105b
Convert synapse/rest/client/v2_alpha/register.py to use read_templates
anoadragon453 e8799e8
Remove load_jinja2_templates method
anoadragon453 2d442bf
Make template content variable names consistent
anoadragon453 7034971
Add a test
anoadragon453 00f4f63
Changelog
anoadragon453 2e7de8d
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/def…
anoadragon453 7b674bf
sample config
anoadragon453 57c64c4
Simplify template loading code
anoadragon453 93555f4
Fix jinja environment filter update code
anoadragon453 ab3f058
Remove extra comma
anoadragon453 bcb04ad
Autoescape always enabled
anoadragon453 c77608c
Filters are not template-specific
anoadragon453 bf79f9e
Add docstring and improve create_mxc_to_http_filter
anoadragon453 49dbd26
Use tempfile.TemporaryDirectory in tests to clean up tmpdir
anoadragon453 1dfca15
misc -> feature
anoadragon453 45d6e4c
Add test for a custom template directory
anoadragon453 de41b66
Move read_templates to Config class
anoadragon453 e7ca492
Raise ConfigError if custom template directory does not exist
anoadragon453 c81cdb6
Add test for ConfigError being raised on invalid custom template dir
anoadragon453 87fea4c
Switch all read_templates calls from handlers to synapse.config
anoadragon453 7660398
Add typing to filter methods
anoadragon453 d9d8d72
Use custom filters on all templates
anoadragon453 405db9a
Switch filter methods to be private
anoadragon453 93b71d8
Only abspath the template_dir if it's set
anoadragon453 a1d7d9c
Fix a couple missed read_templates in account.py
anoadragon453 94300cc
Switch sso read_file calls to read_templates
anoadragon453 f08b610
Move some sso read_templates calls to synapse.config
anoadragon453 7b943e6
Remove stale comment part
anoadragon453 5806a08
Apply self.config suggestions
anoadragon453 c654916
Remove unnecessary import
anoadragon453 d35c049
Some more hs.config -> self.config
anoadragon453 116a895
Render sso deactived/success templates
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Use the default template file when its equivalent is not found in a custom template directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.