Browse files

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


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jacobian committed Aug 28, 2008
1 parent b31568a commit 1a40498da41f2547bec2a3b78db621651ff675d6
Showing with 0 additions and 20 deletions.
  1. +0 −20 django/db/models/fields/
@@ -178,26 +178,6 @@ def delete_file(self, instance, sender, **kwargs):
# Otherwise, just close the file, so it doesn't tie up resources. # Otherwise, just close the file, so it doesn't tie up resources.
file.close() file.close()
def save_file(self, new_data, new_object, original_object, change, rel,
upload_field_name = + '_file'
if new_data.get(upload_field_name, False):
if rel:
file = new_data[upload_field_name][0]
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.
filename =
except AttributeError:
filename = file['filename']
filename = self.get_filename(filename)
getattr(new_object, self.attname).save(filename, file, save)
def get_directory_name(self): def get_directory_name(self):
return os.path.normpath(force_unicode( return os.path.normpath(force_unicode(

0 comments on commit 1a40498

Please sign in to comment.