Commit 5fde5fae authored by chris's avatar chris

Always sort votes set chronologically.

parent d94038fd
......@@ -41,7 +41,8 @@ class Vote(models.Model):
bulletin = models.ForeignKey(Bulletin)
voice = models.BooleanField()
comment = models.CharField(max_length=80,blank=True)
class Meta:
ordering = ['choice']
def __unicode__(self):
return str(self.voice)
......
......@@ -30,7 +30,7 @@
{% for bulletin in object.bulletin_set.all %}
<tr >
<td class='names'>{{ bulletin.voter }}</td>
{% for vote in bulletin.vote_set.all|dictsort:'choice.choice' %}
{% for vote in bulletin.vote_set.all %}
<td class='cell'><div class="{{ vote.voice }}">{% if vote.comment %} <div class="msg"><!-- --></div><span class="tooltip"><font class="white">{{ vote.comment }}</font></span>{% endif %}</div></td>
{% endfor %}
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment