Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
etch
nuages
Commits
5fde5fae
Commit
5fde5fae
authored
May 30, 2011
by
Christophe Siraut
Browse files
Always sort votes set chronologically.
parent
d94038fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
sondage/models.py
View file @
5fde5fae
...
...
@@ -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
)
...
...
templates/sondage/poll_detail.html
View file @
5fde5fae
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment