torchbox/wagtail — pull request #205 by spapas (2014-04-23 09:12:04+00:00)
Title: Add scheduled publishing feature

This PR adds a scheduled publishing feature to Wagtail: Two new fields have been added in ``Page``: ``go_live_datetime`` and ``expiry_datetime``. If ``go_live_datetime`` has a future value when a ``Page`` is published then the ``Page`` won't be ``live`` until that datetime has passed. On the other hand, if the ``expiry_datetime`` has a value on a ``live`` ``Page`` then the ``Page`` will be made non-``live`` when that datetime has passed.

The above time-based opperations are performed with the help of the ``publish_scheduled_pages`` management command which needs to be run every (for instance) one hour to check if any pages should go live or be expired.

For more info please read the individual commit messages.

One thing that this PR is missing is that the go_live and expiry datetimes have to be edited by hand (using datetimes of the form 2014-04-23 14:44) because Wagtail doesn't actually have a DateTimePicker (yet) .