If I can understand your code, of seems you want a table of : Institution | Number of attendees
So if am right u can achive it this way :
{% for org, num in attendees_per_org.items() %}
<tr>
<td>{{ org }}</td>
<td>{{ num }}</td>
</tr>
{% endfor %}
Since your dataset is a dictionary, u need to use key,value to get elements in both side. Also items() is also required.
On May 1, 2015 8:22 AM, "Lachlan Musicman" <datakid@gmail.com> wrote:
-- Hola,
Django shell gives right results, template doesn't: code here
What am I doing wrong?
L.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGBeqiN78i37JA9UJov7%2BAVbJzRt4c5YCX3em2XvN-QmefxSvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMGzuy_WwAKnYddxrYBL5P5O75--EP7Aqrn8a7Fg-5rUgQq02w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment