set Note.name to filename by default
authorSeth Woodworth <seth@sethish.com>
Mon, 25 Mar 2013 23:58:46 +0000 (23:58 +0000)
committerSeth Woodworth <seth@sethish.com>
Mon, 25 Mar 2013 23:58:46 +0000 (23:58 +0000)
karmaworld/apps/ajaxuploader/backends/local.py

index ac083d8e799fdcd01d41be916c456db49c2b367d..5efba15faf73ad3e85a597d4bc5f6e775db20762 100644 (file)
@@ -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"