mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #26533 -- Renamed Widget._format_value() to format_value().
This commit is contained in:
parent
669c29c8f4
commit
859eeaa0f0
7 changed files with 107 additions and 81 deletions
|
@ -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
|
||||
|
|
|
@ -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>``,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue