Initial scheduled publishing documentation.

pull/4157/merge
Patrick Woods 2018-01-10 21:48:44 -05:00 zatwierdzone przez Matt Westcott
rodzic bb1094848f
commit 3f0972507b
4 zmienionych plików z 41 dodań i 5 usunięć

Wyświetl plik

@ -18,5 +18,5 @@ Create new pages by clicking the **Add child page** button. This creates a child
inserting_documents
adding_multiple_items
required_fields
the_promote_tab
previewing_and_submitting_for_moderation
Edit Page tabs <the_promote_tab>
previewing_and_submitting_for_moderation

Wyświetl plik

@ -1,8 +1,12 @@
The Promote tab
~~~~~~~~~~~~~~~
================
Edit Page tabs
================
A common feature of the *Edit* pages for all page types is the two tabs at the top of the screen. The first, Content, is where you build the content of the page itself.
The Promote tab
~~~~~~~~~~~~~~~
The second, *Promote*, is where you can set all the 'metadata' (data about data!) for the page. Below is a description of all default fields in the promote tab and what they do.
* **Slug:** The last part of the web address for the page. E.g. the slug for a blog page called 'The best things on the web' would be the-best-things-on-the-web (``www.example.com/blog/the-best-things-on-the-web``). This is automatically generated from the main page title set in the Content tab. This can be overridden by adding a new slug into the field. Slugs should be entirely lowercase, with words separated by hyphens (-).
@ -14,3 +18,12 @@ The second, *Promote*, is where you can set all the 'metadata' (data about data!
.. Note::
You may see more fields than this in your promote tab. These are just the default fields, but you are free to add other fields to this section as necessary.
The Settings Tab
~~~~~~~~~~~~~~~~
The *Settings* has two fields by default.
* **Go Live date/time:** Sets the time in which the changes should go live when published. If you publish a page that has this field set to a time in the future it will be scheduled until the time comes.
See :ref:`scheduled_publishing` for more details.
* **Expiry date/time:** Sets the time in which this page should be unpublished.

Wyświetl plik

@ -13,7 +13,7 @@ publish_scheduled_pages
$ ./manage.py publish_scheduled_pages
This command publishes or unpublishes pages that have had these actions scheduled by an editor. It is recommended to run this command once an hour.
This command publishes, updates or unpublishes pages that have had these actions scheduled by an editor. It is recommended to run this command once an hour.
.. _fixtree:

Wyświetl plik

@ -95,3 +95,26 @@ For going beyond the basics of model definition and interrelation, it might help
#. A response object is returned by ``serve()`` and Django responds to the requester.
You can apply custom behavior to this process by overriding ``Page`` class methods such as ``route()`` and ``serve()`` in your own models. For examples, see :ref:`model_recipes`.
.. _scheduled_publishing:
Scheduled Publishing
~~~~~~~~~~~~~~~~~~~~
Page publishing can be scheduled through the *Go live date/time* feature in the *Settings* tab of the *Edit* page. This allows you to set set up initial page publishing or a page update in advance and it will only happen at the
scheduled time.
In order for pages to be published at the scheduled time you should set up the :ref:`publish_scheduled_pages` management command.
The basic workflow is as follows.
* Scheduling a revision for a page that is not currently live schedules that page to go live when the scheduled time comes.
* Scheduling a revision for a page that is already live schedules that revision to update the page when the time comes.
* If page has a scheduled revision and you set another revision to publish immediately the scheduled revision will be unscheduled.
The *Revisions* view for a given page will show which revision is scheduled and for when it is scheduled. A scheduled revision in teh list will also provide an *Unschedule* button to cancel it.