summaryrefslogtreecommitdiff
path: root/django/forms/forms.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-02-26 22:48:20 +0100
committerClaude Paroz <claude@2xlibre.net>2014-03-08 09:57:40 +0100
commit210d0489c5daad56b806f8165f9fe09fb3c2a019 (patch)
treef16c665e94669288fec0c3712a5639e9ad1ad1a7 /django/forms/forms.py
parent70ec4d776ef0e68960ccee21476b8654e9399f53 (diff)
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
Diffstat (limited to 'django/forms/forms.py')
-rw-r--r--django/forms/forms.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 26967fba5c..19164aacae 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -12,8 +12,9 @@ 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.html import conditional_escape, format_html
+from django.utils.deprecation import RemovedInDjango18Warning, 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
from django.utils.translation import ugettext as _
from django.utils import six
@@ -43,7 +44,7 @@ def get_declared_fields(bases, attrs, with_base_fields=True):
warnings.warn(
"get_declared_fields is deprecated and will be removed in Django 1.9.",
- PendingDeprecationWarning,
+ RemovedInDjango19Warning,
stacklevel=2,
)
@@ -431,7 +432,7 @@ class BaseForm(object):
if hasattr(field.widget, '_has_changed'):
warnings.warn("The _has_changed method on widgets is deprecated,"
" define it at field level instead.",
- DeprecationWarning, stacklevel=2)
+ 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):