summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-03-21 19:34:21 -0400
committerTim Graham <timograham@gmail.com>2014-03-21 19:34:21 -0400
commitd74e33eb0ec289d3125a5a8048d756f9d232bd62 (patch)
tree676c9f76ee71ef02981652258a67fdfe897f492d
parent306283bf358470b7d439822af90051ac62e95bae (diff)
Removed backwards compatibility code to call field.widget._has_changed()
This logic should be moved to field._has_changed() as described in ebb504db692cac496f4f45762d1d14644c9fa6f - refs #16612.
-rw-r--r--django/forms/forms.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 19164aacae..da30a6220a 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -12,7 +12,7 @@ from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
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 @@ class BaseForm(object):
# Always assume data has changed if validation fails.
self._changed_data.append(name)
continue
- 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):
self._changed_data.append(name)
return self._changed_data