Permalink
Browse files

Changed WeblogEntryFeed in django_website.blog app to ignore future e…

…ntries

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@3535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6780e03 commit 7d344a1fe0723c3147d6ca007d466f95fe340abe adrian committed Aug 8, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 django_website/apps/blog/feeds.py
View
3 django_website/apps/blog/feeds.py
@@ -1,10 +1,11 @@
from django.contrib.syndication.feeds import Feed
from django_website.apps.blog.models import Entry
+import datetime
class WeblogEntryFeed(Feed):
title = "The Django weblog"
link = "http://www.djangoproject.com/weblog/"
description = "Latest news about Django, the Python Web framework."
def items(self):
- return Entry.objects.all()[:10]
+ return Entry.objects.filter(pub_date__lte=datetime.datetime.now())[:10]

0 comments on commit 7d344a1

Please sign in to comment.