From 13643a7f5ded088b870b878712f0f4f39f213e52 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 18 Jul 2008 21:45:25 +0000 Subject: [PATCH] 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 --- django/db/models/base.py | 8 ++------ django/newforms/fields.py | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 338b0618e0..757f2378ce 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -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 ) diff --git a/django/newforms/fields.py b/django/newforms/fields.py index bfff9fe8b0..77bd8cbe94 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -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 )