Files @ a8710b4b9f2a
Branch filter:

Location: website/www/conservancy/sponsors.py

Denver Gingerich
Copyleft Compliance: mostly minor fixes to new pgs

These are mostly minor edits (typo fixes, etc.) to the enforcement
strategy and firmware liberation pages that were just added.

The one large change was to replace the first paragraph of the
enforcement strategy page with the full Conservancy description used
previously. The glue text used to shorten it appeared unsalvageable
and it wasn't immediately obvious how to replace it with something
better, so we used the full description instead.
from django.shortcuts import render
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())
    supporters_count = len(supporters)
    anonymous_count  = len(supporters.filter(display_name = 'Anonymous'))
    supporters = supporters.exclude(display_name = 'Anonymous').order_by('ledger_entity_id')

    c = {
        'supporters' : supporters,
        'supporters_count' : supporters_count,
        'anonymous_count' : anonymous_count
    }
    return render(request, "sponsors.html", c)