summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCoen van der Kamp <coen@fourdigits.nl>2023-03-08 20:12:34 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-28 06:58:10 +0200
commit7bbbadc69383f0a2b99253e153b974f8783e876d (patch)
treef0e4e8a38904aa9772fdae066dbda9dfd41d08b6 /docs
parent070cbac0dbf6a09b55aad322137ab168b75bf56b (diff)
downloaddjango-7bbbadc69383f0a2b99253e153b974f8783e876d.tar.gz
Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/ref/forms/fields.txt14
-rw-r--r--docs/releases/5.0.txt6
3 files changed, 21 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index bb35bd4805..b27348adb0 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -32,6 +32,9 @@ details on these changes.
* The ``ForeignObject.get_reverse_joining_columns()`` method will be removed.
+* The default scheme for ``forms.URLField`` will change from ``"http"`` to
+ ``"https"``.
+
.. _deprecation-removed-in-5.1:
5.1
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index f9a07b1626..4084ae78d5 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -1071,8 +1071,18 @@ For each field, we describe the default widget used if you don't specify
given value is a valid URL.
* Error message keys: ``required``, ``invalid``
- Has the optional arguments ``max_length``, ``min_length``, and
- ``empty_value`` which work just as they do for :class:`CharField`.
+ 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"``.
+
+ .. versionchanged:: 5.0
+
+ The ``assume_scheme`` argument was added.
+
+ .. deprecated:: 5.0
+
+ The default value for ``assume_scheme`` will change from ``"http"`` to
+ ``"https"`` in Django 6.0.
``UUIDField``
-------------
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index 48df713375..dafdc10d62 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -245,6 +245,9 @@ Forms
:ref:`Choices classes <field-choices-enum-types>` directly instead of
requiring expansion with the ``choices`` attribute.
+* The new ``assume_scheme`` argument for :class:`~django.forms.URLField` allows
+ specifying a default URL scheme.
+
Generic Views
~~~~~~~~~~~~~
@@ -403,6 +406,9 @@ Miscellaneous
* The ``ForeignObject.get_reverse_joining_columns()`` method is deprecated.
+* The default scheme for ``forms.URLField`` will change from ``"http"`` to
+ ``"https"`` in Django 6.0.
+
Features removed in 5.0
=======================