mirror of https://github.com/django/django.git
Refs #26533 -- Removed support for Widget._format_value() per deprecation timeline.
This commit is contained in:
parent
9d0e8c1e7f
commit
58d3d14aea
|
@ -15,9 +15,6 @@ from django.forms.utils import to_current_timezone
|
||||||
from django.templatetags.static import static
|
from django.templatetags.static import static
|
||||||
from django.utils import datetime_safe, formats, six
|
from django.utils import datetime_safe, formats, six
|
||||||
from django.utils.dates import MONTHS
|
from django.utils.dates import MONTHS
|
||||||
from django.utils.deprecation import (
|
|
||||||
RemovedInDjango20Warning, RenameMethodsBase,
|
|
||||||
)
|
|
||||||
from django.utils.encoding import (
|
from django.utils.encoding import (
|
||||||
force_str, force_text, python_2_unicode_compatible,
|
force_str, force_text, python_2_unicode_compatible,
|
||||||
)
|
)
|
||||||
|
@ -160,13 +157,7 @@ class MediaDefiningClass(type):
|
||||||
return new_class
|
return new_class
|
||||||
|
|
||||||
|
|
||||||
class RenameWidgetMethods(MediaDefiningClass, RenameMethodsBase):
|
class Widget(six.with_metaclass(MediaDefiningClass)):
|
||||||
renamed_methods = (
|
|
||||||
('_format_value', 'format_value', RemovedInDjango20Warning),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Widget(six.with_metaclass(RenameWidgetMethods)):
|
|
||||||
needs_multipart_form = False # Determines does this widget need multipart form
|
needs_multipart_form = False # Determines does this widget need multipart form
|
||||||
is_localized = False
|
is_localized = False
|
||||||
is_required = False
|
is_required = False
|
||||||
|
|
|
@ -236,11 +236,6 @@ foundation for custom widgets.
|
||||||
isn't guaranteed to be valid input, therefore subclass implementations
|
isn't guaranteed to be valid input, therefore subclass implementations
|
||||||
should program defensively.
|
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:: get_context(name, value, attrs=None)
|
.. method:: get_context(name, value, attrs=None)
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
.. versionadded:: 1.11
|
||||||
|
|
|
@ -373,3 +373,5 @@ these features.
|
||||||
|
|
||||||
* In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a
|
* In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a
|
||||||
``parent_link`` is removed.
|
``parent_link`` is removed.
|
||||||
|
|
||||||
|
* Support for ``Widget._format_value()`` is removed.
|
||||||
|
|
Loading…
Reference in New Issue