diff --git a/www/conservancy/frontpage.py b/www/conservancy/frontpage.py index 269faf61..a35ddeb0 100644 --- a/www/conservancy/frontpage.py +++ b/www/conservancy/frontpage.py @@ -1,5 +1,6 @@ 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): @@ -9,8 +10,10 @@ def view(request): """ 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) diff --git a/www/conservancy/templates/frontpage.html b/www/conservancy/templates/frontpage.html index 2b1498b1..f6234231 100644 --- a/www/conservancy/templates/frontpage.html +++ b/www/conservancy/templates/frontpage.html @@ -46,7 +46,8 @@ {% if press_releases.0.body %}
{% endif %} {% endif %} - + {% if blog.0.is_recent %}