summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-06-29 18:34:41 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-06-29 18:49:37 +0200
commitacd7b34aafe352ef604edcb73f75041c5cbba6b9 (patch)
treeeecb1df66a2070e9a357380fba89febd38c488f4 /django/forms
parent8b9b8d3bda09eb1b447631182d06c6c5e51425f6 (diff)
Advanced deprecation warnings for Django 1.7.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/forms.py2
-rw-r--r--django/forms/models.py6
-rw-r--r--django/forms/widgets.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index b25eeb30a4..6d59271d17 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -352,7 +352,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.",
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
if field.widget._has_changed(initial_value, data_value):
self._changed_data.append(name)
elif field._has_changed(initial_value, data_value):
diff --git a/django/forms/models.py b/django/forms/models.py
index 821f64199b..a0c3009d38 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -260,7 +260,7 @@ class ModelFormMetaclass(type):
warnings.warn("Creating a ModelForm without either the 'fields' attribute "
"or the 'exclude' attribute is deprecated - form %s "
"needs updating" % name,
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
if opts.fields == ALL_FIELDS:
# sentinel for fields_for_model to indicate "get the list of
@@ -513,7 +513,7 @@ def modelform_factory(model, form=ModelForm, fields=None, exclude=None,
getattr(Meta, 'exclude', None) is None):
warnings.warn("Calling modelform_factory without defining 'fields' or "
"'exclude' explicitly is deprecated",
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
# Instatiate type(form) in order to use the same metaclass as form.
return type(form)(class_name, (form,), form_class_attrs)
@@ -796,7 +796,7 @@ def modelformset_factory(model, form=ModelForm, formfield_callback=None,
getattr(meta, 'exclude', exclude) is None):
warnings.warn("Calling modelformset_factory without defining 'fields' or "
"'exclude' explicitly is deprecated",
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
form = modelform_factory(model, form=form, fields=fields, exclude=exclude,
formfield_callback=formfield_callback,
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 38d1b99b0d..a92e5a56ce 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -636,7 +636,7 @@ class RadioChoiceInput(ChoiceInput):
class RadioInput(RadioChoiceInput):
def __init__(self, *args, **kwargs):
msg = "RadioInput has been deprecated. Use RadioChoiceInput instead."
- warnings.warn(msg, PendingDeprecationWarning, stacklevel=2)
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
super(RadioInput, self).__init__(*args, **kwargs)