Skip to content
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

Documentation basic usage missing a get_env example #269

Closed
cglacet opened this issue Jun 5, 2019 · 2 comments
Closed

Documentation basic usage missing a get_env example #269

cglacet opened this issue Jun 5, 2019 · 2 comments

Comments

@cglacet
Copy link
Contributor

cglacet commented Jun 5, 2019

I've spent the last 10 minutes looking for how to add a global to jinja2 environment (get_env, code).

For example, adding the zip function:

env = aiohttp_jinja2.get_env(app)
env.globals.update(zip=zip)

It appears to me as basic and that would be nice to have it referenced, but maybe I'm wrong ^^

@asvetlov
Copy link
Member

asvetlov commented Jun 5, 2019

Feel free to make a pull request, please

@asvetlov
Copy link
Member

The change is published in 1.1.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants