Changeset - f723a74f5110
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 9 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
...
 
@@ -6,11 +6,14 @@ def view(request):
 
    """Conservancy Sponsors Page view
 

	
 
    Performs object queries necessary to render the sponsors page.
 
    """
 

	
 
    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
...
 
@@ -55,12 +55,13 @@ any of its sponsors.</p>
 
  part of <a href="/supporter/">the Official Conservancy Supporter
 
  program</a>.  Those who request public acknowledgment are listed here in
 
  alphabetical order by surname:</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 %}
 
</ul>
 

	
 
{% endblock %}
0 comments (0 inline, 0 general)