Fixed #7816 -- Fixed error in a few DeprecationWarnings. Thanks, leahculver
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7997133a3d
commit
13643a7f5d
|
@ -487,9 +487,7 @@ class Model(object):
|
||||||
if isinstance(raw_field, dict):
|
if isinstance(raw_field, dict):
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as dictionaries is"\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile"\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
|
@ -499,9 +497,7 @@ class Model(object):
|
||||||
elif isinstance(raw_field, basestring):
|
elif isinstance(raw_field, basestring):
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as strings is "\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
|
|
|
@ -442,9 +442,7 @@ class FileField(Field):
|
||||||
# We warn once, then support both ways below.
|
# We warn once, then support both ways below.
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
message = "Representing uploaded files as dictionaries is"\
|
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
|
||||||
" instead.",
|
|
||||||
category = DeprecationWarning,
|
category = DeprecationWarning,
|
||||||
stacklevel = 2
|
stacklevel = 2
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue