Author: adrian
Date: 2006-08-07 23:51:28 -0500 (Mon, 07 Aug 2006)
New Revision: 3535

Modified:
   djangoproject.com/django_website/apps/blog/feeds.py
Log:
Changed WeblogEntryFeed in django_website.blog app to ignore future entries

Modified: djangoproject.com/django_website/apps/blog/feeds.py
===================================================================
--- djangoproject.com/django_website/apps/blog/feeds.py 2006-08-07 17:30:27 UTC 
(rev 3534)
+++ djangoproject.com/django_website/apps/blog/feeds.py 2006-08-08 04:51:28 UTC 
(rev 3535)
@@ -1,5 +1,6 @@
 from django.contrib.syndication.feeds import Feed
 from django_website.apps.blog.models import Entry
+import datetime
 
 class WeblogEntryFeed(Feed):
     title = "The Django weblog"
@@ -7,4 +8,4 @@
     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]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to