From b49074eb6b19d8f5fdb3301a6e50f11845dd530d Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 11 Aug 2014 11:56:25 +0200 Subject: [PATCH] Add documentation about url_for's default scheme Fix #1129 --- flask/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flask/helpers.py b/flask/helpers.py index 77148708..37843a4c 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -248,7 +248,10 @@ def url_for(endpoint, **values): address can be changed via `SERVER_NAME` configuration variable which defaults to `localhost`. :param _scheme: a string specifying the desired URL scheme. The `_external` - parameter must be set to `True` or a `ValueError` is raised. + parameter must be set to `True` or a `ValueError` is raised. The default + behavior uses the same scheme as the current request, or + ``PREFERRED_URL_SCHEME`` from the :ref:`app configuration ` if no + request context is available. :param _anchor: if provided this is added as anchor to the URL. :param _method: if provided this explicitly specifies an HTTP method. """