Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

FIxed #8613: removed vestigal `FileField.save_file()`. Thanks, krator…

…ius.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1a40498da41f2547bec2a3b78db621651ff675d6 1 parent b31568a
Jacob Kaplan-Moss authored August 28, 2008

Showing 1 changed file with 0 additions and 20 deletions. Show diff stats Hide diff stats

  1. 20  django/db/models/fields/files.py
20  django/db/models/fields/files.py
@@ -178,26 +178,6 @@ def delete_file(self, instance, sender, **kwargs):
178 178
             # Otherwise, just close the file, so it doesn't tie up resources.
179 179
             file.close()
180 180
 
181  
-    def save_file(self, new_data, new_object, original_object, change, rel,
182  
-                  save=True):
183  
-        upload_field_name = self.name + '_file'
184  
-        if new_data.get(upload_field_name, False):
185  
-            if rel:
186  
-                file = new_data[upload_field_name][0]
187  
-            else:
188  
-                file = new_data[upload_field_name]
189  
-
190  
-            # Backwards-compatible support for files-as-dictionaries.
191  
-            # We don't need to raise a warning because the storage backend will
192  
-            # do so for us.
193  
-            try:
194  
-                filename = file.name
195  
-            except AttributeError:
196  
-                filename = file['filename']
197  
-            filename = self.get_filename(filename)
198  
-
199  
-            getattr(new_object, self.attname).save(filename, file, save)
200  
-
201 181
     def get_directory_name(self):
202 182
         return os.path.normpath(force_unicode(datetime.datetime.now().strftime(smart_str(self.upload_to))))
203 183
 

0 notes on commit 1a40498

Please sign in to comment.
Something went wrong with that request. Please try again.