mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Added missing stacklevel arg in forms/models.py
This commit is contained in:
@@ -238,7 +238,7 @@ class ModelFormMetaclass(type):
|
|||||||
warnings.warn("Creating a ModelForm without either the 'fields' attribute "
|
warnings.warn("Creating a ModelForm without either the 'fields' attribute "
|
||||||
"or the 'exclude' attribute is deprecated - form %s "
|
"or the 'exclude' attribute is deprecated - form %s "
|
||||||
"needs updating" % name,
|
"needs updating" % name,
|
||||||
PendingDeprecationWarning)
|
PendingDeprecationWarning, stacklevel=2)
|
||||||
|
|
||||||
if opts.fields == ALL_FIELDS:
|
if opts.fields == ALL_FIELDS:
|
||||||
# sentinel for fields_for_model to indicate "get the list of
|
# sentinel for fields_for_model to indicate "get the list of
|
||||||
|
|||||||
Reference in New Issue
Block a user