Start and end date for page publication do not work #245

Closed
yvandermeer opened this Issue Nov 11, 2009 · 2 comments

2 participants

@yvandermeer

Somehow, the logic in PageQuerySet.published() is wrong – someone got lt and gt mixed up I think.

Should be:

if settings.CMS_SHOW_START_DATE:
    pub = pub.filter(
        Q(publication_date__lt=datetime.now()) |
        Q(publication_date__isnull=True)
    )

if settings.CMS_SHOW_END_DATE:
    pub = pub.filter(
        Q(publication_end_date__gte=datetime.now()) |
        Q(publication_end_date__isnull=True)
    )
@digi604
Divio AG member

closed by 5552b51 lt and gt in timed publication mixed up

@yvandermeer

Thanks for fixing this so quickly! Keep up the great work.

@christianbertschy christianbertschy pushed a commit to christianbertschy/django-cms-2.0 that referenced this issue Oct 1, 2012
@digi604 digi604 fixes #245 lt and gt in timed publication mixed up 5552b51
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment