Wagtail query for scheduled pages

Wagtail has "scheduled" pages that are not yet visible on the site. I think the interface is not ideal as you need to click the Publish button after setting a publication date on the Settings tab. I'm not sure how exactly the data models work, but the actual publication is handled by a management command and putting the publication date into the future after the post was published doesn't seem to unpublish it.

I wanted to get a list of pages that were scheduled for publication, the query below might not handle all edge cases but shows how I got what I needed.

Raw
MyPageModel.objects.filter(go_live_at__isnull=False).not_live()

0 comments

Start a new thread

Cancel reply