diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 16:05:09 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 16:05:09 +0000 |
| commit | 1a40498da41f2547bec2a3b78db621651ff675d6 (patch) | |
| tree | 05a1b19c3cf87cd22bb1fbbaa3c6b045e53e7714 | |
| parent | b31568aed34d8728c153ba4e722b7018f2667351 (diff) | |
FIxed #8613: removed vestigal `FileField.save_file()`. Thanks, kratorius.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/models/fields/files.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py index 949f991c5c..fc845c5ba1 100644 --- a/django/db/models/fields/files.py +++ b/django/db/models/fields/files.py @@ -178,26 +178,6 @@ class FileField(Field): # 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)))) |
