From: Seth Woodworth Date: Mon, 25 Mar 2013 23:58:46 +0000 (+0000) Subject: set Note.name to filename by default X-Git-Tag: release-20150131~457^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5c8dafb38cf6d6b2535f5fd66ae504d28c61fb03;p=oweals%2Fkarmaworld.git set Note.name to filename by default --- diff --git a/karmaworld/apps/ajaxuploader/backends/local.py b/karmaworld/apps/ajaxuploader/backends/local.py index ac083d8..5efba15 100644 --- a/karmaworld/apps/ajaxuploader/backends/local.py +++ b/karmaworld/apps/ajaxuploader/backends/local.py @@ -61,6 +61,7 @@ class LocalUploadBackend(AbstractUploadBackend): # Another file copy at FileField's 'upload_to' dir print "creating note" note = Note() + note.name = filename note.note_file = os.path.join(self._dir, filename) note.course_id = request.GET['course_id'] print "saving note"