diff options
| author | Tim Graham <timograham@gmail.com> | 2016-04-23 13:15:45 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-23 13:15:45 -0400 |
| commit | 859eeaa0f0b04c2644237ff04e6632b2f40475cb (patch) | |
| tree | f0db3c0bf0d872d40bfea60cd83fbb8c71fc4518 /docs | |
| parent | 669c29c8f4986def15cc4ee38b27299d32d5009f (diff) | |
Fixed #26533 -- Renamed Widget._format_value() to format_value().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/ref/forms/widgets.txt | 11 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 97534185b2..23dd56576b 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -163,6 +163,8 @@ details on these changes. * In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a ``parent_link`` will be removed. +* Support for ``Widget._format_value()`` will be removed. + .. _deprecation-removed-in-1.10: 1.10 diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index f2b132ce3d..0bdce71f87 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -228,6 +228,17 @@ foundation for custom widgets. In older versions, this attribute was only defined on the date and time widgets (as ``False``). + .. method:: format_value(value) + + Cleans and returns a value for use in the widget template. ``value`` + isn't guaranteed to be valid input, therefore subclass implementations + should program defensively. + + .. versionchanged:: 1.10 + + In older versions, this method is a private API named + ``_format_value()``. The old name will work until Django 2.0. + .. method:: id_for_label(self, id_) Returns the HTML ID attribute of this widget for use by a ``<label>``, diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 137fe9720e..a7a7077bc3 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -983,6 +983,10 @@ Miscellaneous * In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a ``parent_link`` is deprecated. Add ``parent_link=True`` to such fields. +* The private API ``Widget._format_value()`` is made public and renamed to + :meth:`~django.forms.Widget.format_value`. The old name will work + through a deprecation period. + .. _removed-features-1.10: Features removed in 1.10 |
