Files @ 60d0a06e2558
Branch filter:

Location: website/www/conservancy/frontpage.py

bkuhn
progressbar Javascript need not change for content

The content of the amounts for the fundraiser can be kept in the HTML
rather than the progress bar Javscript code.

I suspect at some point I should keep this data in the Django database
and extract it from there as dynamic content.
from django.shortcuts import render_to_response
from conservancy.apps.news.models import PressRelease
from conservancy.apps.blog.models import Entry as BlogEntry
from datetime import datetime, timedelta

def view(request):
    """Conservancy front page view

    Performs all object queries necessary to render the front page.
    """

    press_releases = PressRelease.objects.all().filter(pub_date__lte=datetime.now(), sites=2)[:5]
    blog = BlogEntry.objects.all().filter(pub_date__lte=datetime.now())[:3]

    c = {
        'press_releases': press_releases,
        'blog' : blog
    }
    return render_to_response("frontpage.html", c)