mirror of https://github.com/pallets/flask.git
docs: update docs and CHANGES.rst
This commit is contained in:
parent
45a0ff357f
commit
0abda4d277
|
@ -5,6 +5,7 @@ Unreleased
|
|||
|
||||
- Drop support for Python 3.9. :pr:`5730`
|
||||
- Remove previously deprecated code: ``__version__``. :pr:`5648`
|
||||
- Support for using @app.template_filter, @app.template_test, and @app.template_global decorators without parentheses. :pr:`5736`
|
||||
|
||||
|
||||
Version 3.1.1
|
||||
|
|
|
@ -145,7 +145,11 @@ that. You can either put them by hand into the
|
|||
:attr:`~flask.Flask.jinja_env` of the application or use the
|
||||
:meth:`~flask.Flask.template_filter` decorator.
|
||||
|
||||
The two following examples work the same and both reverse an object::
|
||||
The following examples work the same and all reverse an object::
|
||||
|
||||
@app.template_filter # use the function name as filter name
|
||||
def reverse_filter(s):
|
||||
return s[::-1]
|
||||
|
||||
@app.template_filter('reverse')
|
||||
def reverse_filter(s):
|
||||
|
|
Loading…
Reference in New Issue