Browse files

fixes #245 lt and gt in timed publication mixed up

  • Loading branch information...
1 parent 9eca440 commit 5552b51a570753ee2716efe4930aa2e6ef41a43e @digi604 digi604 committed Nov 12, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 cms/models/query.py
View
7 cms/models/query.py
@@ -49,15 +49,16 @@ def published(self, site=None):
if settings.CMS_SHOW_START_DATE:
pub = pub.filter(
- Q(publication_date__gt=datetime.now()) |
+ Q(publication_date__lt=datetime.now()) |
Q(publication_date__isnull=True)
)
-
+
if settings.CMS_SHOW_END_DATE:
pub = pub.filter(
- Q(publication_end_date__lte=datetime.now()) |
+ Q(publication_end_date__gte=datetime.now()) |
Q(publication_end_date__isnull=True)
)
+
return pub
def expired(self):

0 comments on commit 5552b51

Please sign in to comment.