--- a/taskapp/models.py Thu Jan 06 11:54:57 2011 +0530
+++ b/taskapp/models.py Thu Jan 06 12:08:36 2011 +0530
@@ -171,7 +171,7 @@
class WorkReport(models.Model):
- attachment = models.FileField(upload_to=UPLOADS_DIR)
+ attachment = models.FileField(upload_to=IMAGES_DIR)
remarks = models.TextField()
revision = models.PositiveIntegerField(default=0)
task = models.ForeignKey(Task, related_name = "%(class)s_report")
--- a/taskapp/views/task.py Thu Jan 06 11:54:57 2011 +0530
+++ b/taskapp/views/task.py Thu Jan 06 12:08:36 2011 +0530
@@ -69,7 +69,7 @@
form = WorkReportForm(request.POST, request.FILES)
if form.is_valid():
- r = WorkReport(attachment = form.cleaned_data['remarks'],
+ r = WorkReport(attachment = form.cleaned_data['attachment'],
remarks = form.cleaned_data['remarks'],
revision = old_reports.count(),
task = task,