-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
f-string sytax error when importing macro in a template which filename is also a template #1792
Milestone
Comments
rafalkrupinski
added a commit
to rafalkrupinski/jinja_1792
that referenced
this issue
Jan 15, 2023
Please paste the full traceback. |
|
Any chance to move this forward? |
This was referenced May 26, 2023
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
With this template structure:
When
{% jinja expr %}.jinja
imports a macro using 'from "macro_file.jinja" import my_macro' syntax, Environment.render fails withSyntaxError: f-string: invalid syntax
error message.Internally jinja concatenates the importing template filename into an f-string, which results with invalid f-string:
Couldn't reproduce the error using
import "macro_file.jinja" as m
syntax.Environment:
The text was updated successfully, but these errors were encountered: