Skip to content

Commit 1e75775

Browse files
committed
Expanded url_for docstring for blueprints
1 parent ea7a172 commit 1e75775

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

flask/helpers.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ def url_for(endpoint, **values):
159159
160160
Variable arguments that are unknown to the target endpoint are appended
161161
to the generated URL as query arguments. If the value of a query argument
162-
is `None`, the whole pair is skipped.
162+
is `None`, the whole pair is skipped. In case blueprints are active
163+
you can shortcut references to the same blueprint by prefixing the
164+
local endpoint with a dot (``.``).
165+
166+
This will reference the index function local to the current blueprint::
167+
168+
url_for('.index')
163169
164170
For more information, head over to the :ref:`Quickstart <url-building>`.
165171

0 commit comments

Comments
 (0)