Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #7816 -- Fixed error in a few DeprecationWarnings. Thanks, leah…

…culver

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 13643a7f5ded088b870b878712f0f4f39f213e52 1 parent 7997133
@adrianholovaty adrianholovaty authored
Showing with 3 additions and 9 deletions.
  1. +2 −6 django/db/models/base.py
  2. +1 −3 django/newforms/fields.py
View
8 django/db/models/base.py
@@ -487,9 +487,7 @@ def _save_FIELD_file(self, field, filename, raw_field, save=True):
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 @@ def _save_FIELD_file(self, field, filename, raw_field, save=True):
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
)
View
4 django/newforms/fields.py
@@ -442,9 +442,7 @@ def clean(self, data, initial=None):
# 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
)
Please sign in to comment.
Something went wrong with that request. Please try again.