Author: jacob
Date: 2008-08-28 11:05:09 -0500 (Thu, 28 Aug 2008)
New Revision: 8663

Modified:
   django/trunk/django/db/models/fields/files.py
Log:
FIxed #8613: removed vestigal `FileField.save_file()`. Thanks, kratorius.

Modified: django/trunk/django/db/models/fields/files.py
===================================================================
--- django/trunk/django/db/models/fields/files.py       2008-08-28 15:43:04 UTC 
(rev 8662)
+++ django/trunk/django/db/models/fields/files.py       2008-08-28 16:05:09 UTC 
(rev 8663)
@@ -178,26 +178,6 @@
             # Otherwise, just close the file, so it doesn't tie up resources.
             file.close()
 
-    def save_file(self, new_data, new_object, original_object, change, rel,
-                  save=True):
-        upload_field_name = self.name + '_file'
-        if new_data.get(upload_field_name, False):
-            if rel:
-                file = new_data[upload_field_name][0]
-            else:
-                file = new_data[upload_field_name]
-
-            # Backwards-compatible support for files-as-dictionaries.
-            # We don't need to raise a warning because the storage backend will
-            # do so for us.
-            try:
-                filename = file.name
-            except AttributeError:
-                filename = file['filename']
-            filename = self.get_filename(filename)
-
-            getattr(new_object, self.attname).save(filename, file, save)
-
     def get_directory_name(self):
         return 
os.path.normpath(force_unicode(datetime.datetime.now().strftime(smart_str(self.upload_to))))
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to