--- a/app/projrev/views/helpers/templatetags/review_helpers.py Mon Aug 10 01:00:32 2009 +0530
+++ b/app/projrev/views/helpers/templatetags/review_helpers.py Mon Aug 10 01:38:02 2009 +0530
@@ -11,9 +11,13 @@
register = template.Library()
-@register.inclusion_tag('projrev/templatetags/_as_comment.html')
-def as_comment(review):
+@register.inclusion_tag('projrev/templatetags/_as_review.html')
+def as_review(review):
"""Returns the comment contexts for the template tag.
"""
- return {'comment_entity': review}
+ total_score = (review.attribute1 + review.attribute2 + review.attribute3 +
+ review.attribute4 + review.attribute5 + review.attribute6 +
+ review.attribute7 + review.attribute8 + review.attribute9)
+
+ return {'review': review, 'total_score': total_score}