Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 7d344a1fe0723c3147d6ca007d466f95fe340abe 1 parent 6780e03
adrian authored
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,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 @@ class WeblogEntryFeed(Feed):
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]
Please sign in to comment.
Something went wrong with that request. Please try again.