Skip to content
Myr

Merge pull request #3244 from paulgb/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Clarify documentation about how url_for uses configuration values (#2759)

authored by David Lord · committed by GitHub · parents 13b689b, a327294 · Browse files · 2 files+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−1 removed

  • other:+7 added−1 removed

2 files+7 added−1 removed

modified:docs/config.rst+4 added-1 removed
274 unmodified lines
275276.. py:data:: APPLICATION_ROOT277278 Inform the application what path it is mounted under by the application /279 web server.279 web server. This is used for generating URLs outside the context of a280 request (inside a request, the dispatcher is responsible for setting281 ``SCRIPT_NAME`` instead; see :ref:`Application Dispatching <app-dispatch>`282 for examples of dispatch configuration).283284 Will be used for the session cookie path if ``SESSION_COOKIE_PATH`` is not285 set.286
411 unmodified lines
modified:flask/helpers.py+3 added
228 unmodified lines
229 url_for('.index')230231 For more information, head over to the :ref:`Quickstart <url-building>`.232233 Configuration values ``APPLICATION_ROOT`` and ``SERVER_NAME`` are only used when 234 generating URLs outside of a request context.235236 To integrate applications, :class:`Flask` has a hook to intercept URL build237 errors through :attr:`Flask.url_build_error_handlers`. The `url_for`238 function results in a :exc:`~werkzeug.routing.BuildError` when the current239 app does not have a URL for the given endpoint and values. When it does, the
876 unmodified lines