-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/tera: Support Tera Templating #515
Open
Galitan-dev
wants to merge
26
commits into
poem-web:master
Choose a base branch
from
Galitan-dev:feat/tera
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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 I broke the Locale extractor, I thought that my implementation of FromRequest for FromRequestSync worked |
I think we are good |
attila-lin
reviewed
Feb 19, 2023
Galitan-dev
force-pushed
the
feat/tera
branch
from
February 19, 2023 16:56
748000b
to
f686047
Compare
I force-pushed because the commit is for the next PR. |
sunli829
reviewed
Jun 6, 2023
Comment on lines
+331
to
+340
|
||
/// Extract from request head and body synchronously. | ||
fn from_request_sync(_req: &'a Request, _body: &mut RequestBody) -> Result<Self> { | ||
panic!("Not implemented, please implement one of from_request and from_request_sync"); | ||
} | ||
|
||
/// Extract from request head synchronously. | ||
fn from_request_without_body_sync(req: &'a Request) -> Result<Self> { | ||
Self::from_request_sync(req, &mut Default::default()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary, what do you think? @Galitan-dev
Suggested change
/// Extract from request head and body synchronously. | |
fn from_request_sync(_req: &'a Request, _body: &mut RequestBody) -> Result<Self> { | |
panic!("Not implemented, please implement one of from_request and from_request_sync"); | |
} | |
/// Extract from request head synchronously. | |
fn from_request_without_body_sync(req: &'a Request) -> Result<Self> { | |
Self::from_request_sync(req, &mut Default::default()) | |
} | |
/// Extract from request head and body synchronously. | |
fn from_request_sync(_req: &'a Request, _body: &mut RequestBody) -> Result<Self> { | |
panic!("Not implemented, please implement one of from_request and from_request_sync"); | |
} | |
/// Extract from request head synchronously. | |
fn from_request_without_body_sync(req: &'a Request) -> Result<Self> { | |
Self::from_request_sync(req, &mut Default::default()) | |
} |
sunli829
force-pushed
the
master
branch
4 times, most recently
from
March 30, 2024 09:25
0c16a9b
to
f6bec88
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Feat/tera: Support Tera Templating
See Issue #512
Description
I added Tera Templating support (the Tera instance is sent to handlers via the request extensions). I also implemented the i18n tera filters as said in my last PR.
Usage Example
(See the new tera-i18n example)