Support anonymous supporter listings by count.

Remove anonymous listing from the alphabetical supporters list and
instead list them by count found.
This commit is contained in:
Bradley M. Kuhn 2015-01-03 09:53:44 -05:00
parent 462cbc3963
commit f723a74f51
2 changed files with 5 additions and 1 deletions

View file

@ -9,8 +9,11 @@ def view(request):
"""
supporters = Supporter.objects.all().filter(display_until_date__gte=datetime.now())
anonymous_count = len(supporters.filter(display_name = 'Anonymous'))
supporters = supporters.exclude(display_name = 'Anonymous')
c = {
'supporters' : supporters
'supporters' : supporters,
'anonymous_count' : anonymous_count
}
return render_to_response("sponsors.html", c)

View file

@ -58,6 +58,7 @@ any of its sponsors.</p>
<a id="supporters"></a>
<ul id="supporters">
<li>Anonymous ({{anonymous_count|safe}} people)</li>
{% for ss in supporters %}
<li>{{ ss.display_name|safe }}</li>
{% endfor %}