equal
deleted
inserted
replaced
9 from django import template |
9 from django import template |
10 |
10 |
11 register = template.Library() |
11 register = template.Library() |
12 |
12 |
13 |
13 |
14 @register.inclusion_tag('projrev/templatetags/_as_comment.html') |
14 @register.inclusion_tag('projrev/templatetags/_as_review.html') |
15 def as_comment(review): |
15 def as_review(review): |
16 """Returns the comment contexts for the template tag. |
16 """Returns the comment contexts for the template tag. |
17 """ |
17 """ |
18 |
18 |
19 return {'comment_entity': review} |
19 total_score = (review.attribute1 + review.attribute2 + review.attribute3 + |
|
20 review.attribute4 + review.attribute5 + review.attribute6 + |
|
21 review.attribute7 + review.attribute8 + review.attribute9) |
|
22 |
|
23 return {'review': review, 'total_score': total_score} |