summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2023-11-24 23:00:17 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-11-25 17:08:50 +0100
commit0203771b626c27c1af24cdeb0e425ccca3d19ad5 (patch)
tree9f3bdd257cad8ce7eb550974ecfe4a1888e5b078 /docs
parent978680db224601e3e09f715c82f89f390c63a763 (diff)
Refs #34380 -- Improved docs for forms.URLField.assume_scheme.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/forms/fields.txt12
-rw-r--r--docs/releases/5.0.txt4
2 files changed, 10 insertions, 6 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index ed685cfff6..0f32df0ebb 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -1141,12 +1141,16 @@ For each field, we describe the default widget used if you don't specify
* Error message keys: ``required``, ``invalid``
Has the optional arguments ``max_length``, ``min_length``, ``empty_value``
- which work just as they do for :class:`CharField`, and ``assume_scheme``
- that defaults to ``"http"``.
+ which work just as they do for :class:`CharField`, and one more argument:
- .. versionchanged:: 5.0
+ .. attribute:: assume_scheme
+
+ .. versionadded:: 5.0
- The ``assume_scheme`` argument was added.
+ The scheme assumed for URLs provided without one. Defaults to
+ ``"http"``. For example, if ``assume_scheme`` is ``"https"`` and the
+ provided value is ``"example.com"``, the normalized value will be
+ ``"https://example.com"``.
.. deprecated:: 5.0
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index 269e3b382e..b74a0f00c7 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -338,8 +338,8 @@ File Storage
Forms
~~~~~
-* The new ``assume_scheme`` argument for :class:`~django.forms.URLField` allows
- specifying a default URL scheme.
+* The new :attr:`~django.forms.URLField.assume_scheme` argument for
+ :class:`~django.forms.URLField` allows specifying a default URL scheme.
* In order to improve accessibility, the following changes are made: