From 690c22c4b83ea2fe09b141bfacbac7087503db3f Mon Sep 17 00:00:00 2001
From: Madhusudan.C.S
Date: Sun, 24 Jul 2011 18:03:37 +0530
Subject: Add support to display the contents of the stored uploaded work
submission fields.
---
pytask/taskapp/views/task.py | 2 ++
pytask/templates/task/view.html | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/pytask/taskapp/views/task.py b/pytask/taskapp/views/task.py
index 4b08543..5ecd551 100755
--- a/pytask/taskapp/views/task.py
+++ b/pytask/taskapp/views/task.py
@@ -208,10 +208,12 @@ def view_task(request, task_id, **kwargs):
is_reviewer = True if user in task.reviewers.all() else False
comments = task.comments.filter(
is_deleted=False).order_by('comment_datetime')
+ reports = task.reports.order_by('submitted_at')
context.update({'is_reviewer':is_reviewer,
'comments':comments,
'reviewers':reviewers,
+ 'reports': reports,
})
selected_users = task.selected_users.all()
diff --git a/pytask/templates/task/view.html b/pytask/templates/task/view.html
index d0cafcf..bee0abf 100644
--- a/pytask/templates/task/view.html
+++ b/pytask/templates/task/view.html
@@ -115,6 +115,28 @@ along with PyTask. If not, see
+ {% for report in reports %}
+
+ {{ report.submitted_by.username }}
+
+ on {{ report.submitted_at|date:"D d M Y"}} at
+ {{comment.submitted_at|time:"H:i"}} wrote:
+
+ {{ report.data|linebreaksbr }}
+ {% if report.attachment %}
+ {% pygment cssclass="codehilite" %}
+
+ {% ssi report.attachment.url|safe %}
+
+ {% endpygment %}