-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(template): add
template_str
for rendering from strings (#2689)
* feat(template): add ``template_str`` for rendering from strings * fix: match media type options for template files * fix: warn of precedence * feat: add mako * fix: media type setting wrong * feat: minijinja * chore: remove testing method * chore: apply @Alc-Alc suggestion * docs: add usage documentation * tests: add tests * ci: mypy * fix(tests): caught bug that was running minijinja tests as jinja * docs: properly link to HTMX page * ci(coverage): fill in missing coverage * tests: test catching ``None`` template types * tests: fix none type tests converge boilerplate 3x into 1x * Update litestar/response/template.py Co-authored-by: guacs <[email protected]> * fix: raise error if both template_name and template_str are defined * docs: remove stale statement about precedence * ci(mypy): make happy the type checking goddess * chore: apply suggestion from @guacs * chore: apply suggestion from @peterschutt * fix: remove unneeded check * test: rework test to get new error raised * ci(typing): make mypy happy-ish * refactor: narrowing away optional template engine * ci: apply pre-commit --------- Co-authored-by: guacs <[email protected]> Co-authored-by: Peter Schutt <[email protected]> Co-authored-by: alc-alc <[email protected]>
- Loading branch information
1 parent
38f3b19
commit d536235
Showing
14 changed files
with
247 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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.