-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Forward Context instance #21
Conversation
Seems pretty reasonable. Thanks for including tests! Any idea if there are changes that should be made to the Jinja code in this situation? |
No, I don't know if there is something similar for Jinja, but since BTW, django-templated-email expects this behavior; they've been waiting for a fix since 2017 😮. |
Right so theoretically you could create a |
FYI I released 0.8 with this change in it. Thanks! |
This pull request makes
render_block_to_string()
forwards theContext
instance provided by the user.For example, this allows the user to disable autoescape, like so:
Such a feature is handy when rendering a text-only template, like an email or a notification message.