From: Radek Czajka Date: Tue, 14 Jun 2011 13:52:35 +0000 (+0200) Subject: fix X-Git-Url: https://git.mdrn.pl/audio.git/commitdiff_plain/ed988f2b33845617a5f2de3c5530a97b9d24aea4 fix --- diff --git a/apps/archive/forms.py b/apps/archive/forms.py index 772ec0a..5326261 100755 --- a/apps/archive/forms.py +++ b/apps/archive/forms.py @@ -23,7 +23,10 @@ class AudiobookForm(forms.ModelForm): if not os.path.isdir(FILES_PATH): os.makedirs(FILES_PATH) # save the file in model - m.source_file.save(os.path.basename(path), ExistingFile(path)) + bn = os.path.basename(path) + ef = ExistingFile(path) + + m.source_file.save(bn, ef) if commit: m.save()