forked from orbit-oss/flask
Fixed some rst markup problems
This commit is contained in:
parent
833198c91b
commit
2ba37d2b85
1 changed files with 5 additions and 5 deletions
10
flask/app.py
10
flask/app.py
|
|
@ -1171,14 +1171,14 @@ class Flask(_PackageBoundObject):
|
|||
You can specify a name for the global function, otherwise the function
|
||||
name will be used. Example::
|
||||
|
||||
@app.template_global()
|
||||
def double(n):
|
||||
return 2 * n
|
||||
@app.template_global()
|
||||
def double(n):
|
||||
return 2 * n
|
||||
|
||||
.. versionadded:: 0.10
|
||||
|
||||
:param name: the optional name of the global function, otherwise the
|
||||
function name will be used.
|
||||
function name will be used.
|
||||
"""
|
||||
def decorator(f):
|
||||
self.add_template_global(f, name=name)
|
||||
|
|
@ -1193,7 +1193,7 @@ class Flask(_PackageBoundObject):
|
|||
.. versionadded:: 0.10
|
||||
|
||||
:param name: the optional name of the global function, otherwise the
|
||||
function name will be used.
|
||||
function name will be used.
|
||||
"""
|
||||
self.jinja_env.globals[name or f.__name__] = f
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue