Commits

adr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 3664e09

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

  • Participants
  • Parent commits 795e552

Comments (0)

Files changed (2)

File django/db/models/base.py

         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
             )
         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
             )

File django/newforms/fields.py

             # 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
             )