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):
|
||||
import warnings
|
||||
warnings.warn(
|
||||
message = "Representing uploaded files as dictionaries is"\
|
||||
" deprecated. Use django.core.files.SimpleUploadedFile"\
|
||||
" instead.",
|
||||
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||
category = DeprecationWarning,
|
||||
stacklevel = 2
|
||||
)
|
||||
|
@ -499,9 +497,7 @@ class Model(object):
|
|||
elif isinstance(raw_field, basestring):
|
||||
import warnings
|
||||
warnings.warn(
|
||||
message = "Representing uploaded files as strings is "\
|
||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
||||
" instead.",
|
||||
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||
category = DeprecationWarning,
|
||||
stacklevel = 2
|
||||
)
|
||||
|
|
|
@ -442,9 +442,7 @@ class FileField(Field):
|
|||
# We warn once, then support both ways below.
|
||||
import warnings
|
||||
warnings.warn(
|
||||
message = "Representing uploaded files as dictionaries is"\
|
||||
" deprecated. Use django.core.files.SimpleUploadedFile "\
|
||||
" instead.",
|
||||
message = "Representing uploaded files as dictionaries is deprecated. Use django.core.files.uploadedfile.SimpleUploadedFile instead.",
|
||||
category = DeprecationWarning,
|
||||
stacklevel = 2
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue