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 )