mirror of
https://github.com/django/django.git
synced 2025-05-07 07:26:29 +00:00
[5.0.x] Refs #34380 -- Improved docs for forms.URLField.assume_scheme.
Backport of 0203771b626c27c1af24cdeb0e425ccca3d19ad5 from main
This commit is contained in:
parent
4d33816ca6
commit
4c74dff759
@ -1140,12 +1140,16 @@ For each field, we describe the default widget used if you don't specify
|
|||||||
* Error message keys: ``required``, ``invalid``
|
* Error message keys: ``required``, ``invalid``
|
||||||
|
|
||||||
Has the optional arguments ``max_length``, ``min_length``, ``empty_value``
|
Has the optional arguments ``max_length``, ``min_length``, ``empty_value``
|
||||||
which work just as they do for :class:`CharField`, and ``assume_scheme``
|
which work just as they do for :class:`CharField`, and one more argument:
|
||||||
that defaults to ``"http"``.
|
|
||||||
|
|
||||||
.. versionchanged:: 5.0
|
.. attribute:: assume_scheme
|
||||||
|
|
||||||
The ``assume_scheme`` argument was added.
|
.. versionadded:: 5.0
|
||||||
|
|
||||||
|
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
|
.. deprecated:: 5.0
|
||||||
|
|
||||||
|
@ -338,8 +338,8 @@ File Storage
|
|||||||
Forms
|
Forms
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
* The new ``assume_scheme`` argument for :class:`~django.forms.URLField` allows
|
* The new :attr:`~django.forms.URLField.assume_scheme` argument for
|
||||||
specifying a default URL scheme.
|
:class:`~django.forms.URLField` allows specifying a default URL scheme.
|
||||||
|
|
||||||
* In order to improve accessibility, the following changes are made:
|
* In order to improve accessibility, the following changes are made:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user