diff --git a/docs/reference/pages/model_reference.rst b/docs/reference/pages/model_reference.rst index 872364aef..fce880e75 100644 --- a/docs/reference/pages/model_reference.rst +++ b/docs/reference/pages/model_reference.rst @@ -1,70 +1,62 @@ Page model Reference ==================== -.. automodule:: wagtail.wagtailcore.models - ``Page`` Class Reference ~~~~~~~~~~~~~~~~~~~~~~~~ -Fields ------- +.. automodule:: wagtail.wagtailcore.models +.. autoclass:: Page -.. glossary:: + The following Django model fields are provided for all pages and are queryable from ``Page.objects``. - ``title`` (text) + .. attribute:: title (text) Human-readable title of the page. - ``slug`` (text) + .. attribute:: slug (text) - The slug of the page. This is used for constructing the page's URL. + The slug of the page. This is used for constructing the page's URL. - For example: ``http://domain.com/blog/[my-slug]/`` + For example: ``http://domain.com/blog/[my-slug]/`` - ``content_type`` (foreign key) + .. attribute:: content_type (foreign key) - A foreign key to the :class:`~django.contrib.contenttypes.models.ContentType` object that represents the specific model of this page. + A foreign key to the :class:`~django.contrib.contenttypes.models.ContentType` object that represents the specific model of this page. - ``live`` (boolean) + .. attribute:: live (boolean) - A boolean that is set to ``True`` if the page is published. + A boolean that is set to ``True`` if the page is published. - Note: this field defaults to ``True`` meaning that any pages that are created programmatically will be published by default. + Note: this field defaults to ``True`` meaning that any pages that are created programmatically will be published by default. - ``has_unpublished_changes`` (boolean) + .. attribute:: has_unpublished_changes (boolean) - A boolean that is set to ``True`` when the page is either in draft or published with draft changes. + A boolean that is set to ``True`` when the page is either in draft or published with draft changes. - ``owner`` (foreign key) + .. attribute:: owner (foreign key) - A foreign key to the user that created the page. + A foreign key to the user that created the page. - ``first_published_at`` (date/time) + .. attribute:: first_published_at (date/time) - The date/time when the page was first published. + The date/time when the page was first published. - ``seo_title`` (text) + .. attribute:: seo_title (text) - Alternate SEO-crafted title, for use in the page's ``