Changeset - f723a74f5110
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 7 years ago 2015-01-03 14:53:44
bkuhn@ebb.org
Support anonymous supporter listings by count.

Remove anonymous listing from the alphabetical supporters list and
instead list them by count found.
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/sponsors.py
Show inline comments
...
 
@@ -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)
www/conservancy/templates/sponsors.html
Show inline comments
...
 
@@ -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 %}
0 comments (0 inline, 0 general)