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

decorators to add custom jinja filters/globals #13

Closed
sebest opened this issue Apr 23, 2010 · 8 comments
Closed

decorators to add custom jinja filters/globals #13

sebest opened this issue Apr 23, 2010 · 8 comments

Comments

@sebest
Copy link
Contributor

sebest commented Apr 23, 2010

Hello,

it would be nice to have a decorator to define a function as a jinja filter instead of adding the function to
app.jinja_env.filters

thanx

@mitsuhiko
Copy link
Contributor

Makes a lot of sense, do you want to make a patch with tests for that?

@sebest
Copy link
Contributor Author

sebest commented Apr 23, 2010

yes, i'll give it a try!

@sebest
Copy link
Contributor Author

sebest commented Apr 23, 2010

any advice on the place to put this code?

@cgrinds
Copy link
Contributor

cgrinds commented Apr 23, 2010

Hey sebest - How about forking and changing the code there?

@sebest
Copy link
Contributor Author

sebest commented Apr 24, 2010

@cgrind: my question was related to flask code organization. (not github usage)

@mitsuhiko
Copy link
Contributor

Flask.template_filter :)

@mitsuhiko
Copy link
Contributor

Pulled the changes.

@lestatcheb
Copy link

mitsuhiko, can you please add also Flask.template_global decorator for add functions to app.jinja_env.globals ?

Thanks!

erishforG added a commit to erishforG/flask that referenced this issue Apr 3, 2015
design.rst whole paragraph translation end
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants