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
 
from django.shortcuts import render_to_response
 
from conservancy.apps.supporters.models import Supporter as Supporter
 
from datetime import datetime, timedelta
 

	
 
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
...
 
@@ -13,54 +13,55 @@
 
work, and asks everyone <a href="/donate">to donate generously</a>.
 

	
 
<h2>Sponsors</h2>
 

	
 
<p>The sponsors whose logos are listed below (in alphabetical order) have donated
 
substantially in the past twelve months to support the ongoing work of
 
Conservancy.  These sponsors support our work through financial
 
contributions.  Conservancy graciously thanks these sponsors for their
 
support, but doesn't necessarily endorse nor promote any specific activity of
 
any of its sponsors.</p>
 

	
 
<ul id="sponsor">
 
<li><a href="http://appendto.com/"><img src="/img/sponsors/appendTo.png" height="75" width="200" alt="appendTo" /></a></li>
 
<li><a href="http://www.blackducksoftware.com/"><img src="/img/sponsors/black-duck.jpg" height="51" width="230" alt="Black Duck" /></a></li>
 
<li><a href="http://www.citrix.com/"><img src="/img/sponsors/citrix.png" height="79" width="250" alt="Citrix" /></a></li>
 
<li><a href="http://gandi.net"><img src="/img/sponsors/gandi.png" height="65" width="171" alt="Gandi.Net" /></a></li>
 
<li><a href="http://google.com"><img src="/img/sponsors/google.png" height="76" width="238" alt="Google" /></a></li>
 
<li><a href="http://www.hp.com/"><img src="/img/sponsors/hp.png" height="75" width="75" alt="HP" /></a></li>
 
<li><a href="http://linuxfoundation.org"><img src="/img/sponsors/linuxfoundation.png" height="76" width="250" alt="Linux Foundation" /></a></li>
 
<li><a href="https://github.com/davidmarin"><img src="/img/sponsors/marin-halpin.png" height="80" width="250" alt="David Marin and Amanda Halpin" /></a></li>
 
<li><a href="https://www.mozilla.org/foundation/"><img src="/img/sponsors/mozilla.png" height="101" width="250" alt="Mozilla Foundation" /></a></li>
 
<li><a href="https://www.privateinternetaccess.com/"><img src="/img/sponsors/privateinternetaccess.jpg" height="52" width="220" alt="Private Internet Access" /></a></li>
 
<li><a href="https://www.redhat.com/"><img src="/img/sponsors/redhat.png" height="80" width="250" alt="Red Hat" /></a></li>
 
<li><a href="https://www.samsung.com/"><img src="/img/sponsors/samsung.jpg" height="83" width="250" alt="Samsung" /></a></li>
 
</ul>
 

	
 
<!-- This section will be added when we have in-kind contributions -->
 

	
 
<!-- <h3>In-Kind Donation of Services</h3> -->
 

	
 
<!-- <p>Conservancy would also like to thank the following companies who have -->
 
<!--   donated services and/or resources in-kind to support Conservancy's -->
 
<!--   work.</p> -->
 

	
 
<!-- <ul> -->
 
<!-- </ul> -->
 
<br/>
 
<hr/>
 
<br/>
 
<h2>Supporters</h2>
 

	
 
<p>Conservancy Supporters are individuals who give $120 or more annually as
 
  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)