We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe your use case.
I have a config object that I'd like to pass to all templates.
config
Currently I have to dig into the source and figure out a workaround like this:
app.ext.environment.globals.update({ 'config': config })
Describe the solution you'd like
A configuration point like:
from sanic import Sanic app = Sanic(__name__) app.config.templating_globals = { 'config': config } # or app.config.templating_environment.globals.update({ 'config': config })
Will PR myself, but want to ask for input first.
The text was updated successfully, but these errors were encountered:
That is the intended pattern, and not a workaround. It probably could be documented better.
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe your use case.
I have a
config
object that I'd like to pass to all templates.Currently I have to dig into the source and figure out a workaround like this:
Describe the solution you'd like
A configuration point like:
Will PR myself, but want to ask for input first.
The text was updated successfully, but these errors were encountered: