add number of events to speaker list

This commit is contained in:
Thomas Steen Rasmussen 2016-08-08 20:49:52 +02:00
parent 35856f6347
commit a8844fa72b

View file

@ -10,7 +10,7 @@
{% for speaker in speaker_list %} {% for speaker in speaker_list %}
<a href="{% url 'schedule:speaker_detail' slug=speaker.slug %}" class="list-group-item"> <a href="{% url 'schedule:speaker_detail' slug=speaker.slug %}" class="list-group-item">
{{ speaker.name }} {{ speaker.name }}
</a> </a> ({{ speaker.events.all.count }} event{{ speaker.events.all.count|pluralize }})
{% endfor %} {% endfor %}
</div> </div>
{% endblock content %} {% endblock content %}