Browse files

Removed backwards compatibility code to call field.widget._has_changed()

This logic should be moved to field._has_changed() as described
in ebb504d - refs #16612.
  • Loading branch information...
1 parent 306283b commit d74e33eb0ec289d3125a5a8048d756f9d232bd62 @timgraham timgraham committed Mar 21, 2014
Showing with 2 additions and 8 deletions.
  1. +2 −8 django/forms/
10 django/forms/
@@ -12,7 +12,7 @@
from django.forms.fields import Field, FileField
from django.forms.utils import flatatt, ErrorDict, ErrorList
from django.forms.widgets import Media, MediaDefiningClass, TextInput, Textarea
-from django.utils.deprecation import RemovedInDjango18Warning, RemovedInDjango19Warning
+from django.utils.deprecation import RemovedInDjango19Warning
from django.utils.encoding import smart_text, force_text, python_2_unicode_compatible
from django.utils.html import conditional_escape, format_html
from django.utils.safestring import mark_safe
@@ -429,13 +429,7 @@ def changed_data(self):
# Always assume data has changed if validation fails.
- if hasattr(field.widget, '_has_changed'):
- warnings.warn("The _has_changed method on widgets is deprecated,"
- " define it at field level instead.",
- RemovedInDjango18Warning, stacklevel=2)
- if field.widget._has_changed(initial_value, data_value):
- self._changed_data.append(name)
- elif field._has_changed(initial_value, data_value):
+ if field._has_changed(initial_value, data_value):
return self._changed_data

0 comments on commit d74e33e

Please sign in to comment.