Permalink
Browse files

bth: fixing news feed

  • Loading branch information...
1 parent ac0d052 commit 0bc6a5f3b633b5286e33911b1f63f1e97123bd15 @benthuffine committed Dec 22, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 apps/content/feeds.py
@@ -2,15 +2,15 @@
from django.contrib.syndication.views import Feed
from neighborlink.apps.content.models import *
-from datetime import datetime
+import datetime
class LatestNewsEventsFeed(Feed):
title = "%s News and Events" % settings.SITE_NAME
link = "/news-and-events/"
description = "Latest news and events for %s" % settings.SITE_NAME
def items(self):
- return NewsEvent.objects.filter(start_date__lte=datetime.now(), end_date__gte=datetime.now(), approved=True).order_by('-event_start_date')[:5]
+ return NewsEvent.objects.filter(start_date__lte=datetime.datetime.now(), end_date__gte=datetime.datetime.now(), approved=True).order_by('-event_start_date')[:5]
def item_title(self, item):
return item.title
@@ -19,7 +19,7 @@ def item_description(self, item):
return item.content
def item_pubdate(self, item):
- return item.insert_date
+ return datetime.datetime.combine(item.insert_date, datetime.time())
class LatestAboutPageFeed(Feed):
title = "%s Articles" % settings.SITE_NAME
@@ -36,4 +36,4 @@ def item_description(self, item):
return item.content
def item_pubdate(self, item):
- return item.insert_date
+ return datetime.datetime.combine(item.insert_date, datetime.time())

0 comments on commit 0bc6a5f

Please sign in to comment.