From dcf7736e1811536ed142bb2de32288faf22f2f0e Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 14 Jun 2011 16:17:40 +0200 Subject: [PATCH] fix --- apps/archive/forms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/archive/forms.py b/apps/archive/forms.py index 5326261..922bd28 100755 --- a/apps/archive/forms.py +++ b/apps/archive/forms.py @@ -23,10 +23,10 @@ class AudiobookForm(forms.ModelForm): if not os.path.isdir(FILES_PATH): os.makedirs(FILES_PATH) # save the file in model - bn = os.path.basename(path) - ef = ExistingFile(path) - - m.source_file.save(bn, ef) + + m.source_file.save( + os.path.join(FILES_PATH, os.path.basename(path)), + ExistingFile(path)) if commit: m.save() -- 2.20.1