From 096d1fd42c206c4b92a1054a3d868cbaa019781c Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 19 Feb 2015 16:53:24 +0000 Subject: [PATCH] Moved page fields reference into reference section --- docs/core_components/pages/creating_pages.rst | 61 ------------------- docs/reference/index.rst | 1 + docs/reference/page.rst | 58 ++++++++++++++++++ 3 files changed, 59 insertions(+), 61 deletions(-) create mode 100644 docs/reference/page.rst diff --git a/docs/core_components/pages/creating_pages.rst b/docs/core_components/pages/creating_pages.rst index dac2aeca1..731ab9ca5 100644 --- a/docs/core_components/pages/creating_pages.rst +++ b/docs/core_components/pages/creating_pages.rst @@ -87,67 +87,6 @@ Wagtail provides some fields for the ``Page`` class by default, which will be co ``show_in_menus`` (boolean) Toggles whether the page should be considered for inclusion in any site-wide menus you create. - -Page Attributes, Properties and Methods Reference -------------------------------------------------- - -In addition to the model fields provided, ``Page`` has many properties and methods that you may wish to reference, use, or override in creating your own models. Those listed here are relatively straightforward to use, but consult the Wagtail source code for a full view of what's possible. - -.. automodule:: wagtail.wagtailcore.models -.. autoclass:: Page - - .. autoattribute:: specific - - .. autoattribute:: specific_class - - .. autoattribute:: url - - .. autoattribute:: full_url - - .. automethod:: get_verbose_name - - .. automethod:: relative_url - - .. automethod:: is_navigable - - .. automethod:: route - - .. automethod:: serve - - .. automethod:: get_context - - .. automethod:: get_template - - .. autoattribute:: preview_modes - - .. automethod:: serve_preview - - .. automethod:: get_ancestors - - .. automethod:: get_descendants - - .. automethod:: get_siblings - - .. automethod:: search - - .. attribute:: search_fields - - A list of fields to be indexed by the search engine. See Search docs :ref:`wagtailsearch_indexing_fields` - - .. attribute:: subpage_types - - A whitelist of page models which can be created as children of this page type e.g a ``BlogIndex`` page might allow ``BlogPage``, but not ``JobPage`` e.g - - .. code-block:: python - - class BlogIndex(Page): - subpage_types = ['mysite.BlogPage', 'mysite.BlogArchivePage'] - - .. attribute:: password_required_template - - Defines which template file should be used to render the login form for Protected pages using this model. This overrides the default, defined using ``PASSWORD_REQUIRED_TEMPLATE`` in your settings. See :ref:`private_pages` - - Tips ~~~~ diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 568600b52..92817e12a 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -7,3 +7,4 @@ Reference management_commands project_template + page diff --git a/docs/reference/page.rst b/docs/reference/page.rst new file mode 100644 index 000000000..3cf3b3c7d --- /dev/null +++ b/docs/reference/page.rst @@ -0,0 +1,58 @@ +Page Attributes, Properties and Methods Reference +------------------------------------------------- + +In addition to the model fields provided, ``Page`` has many properties and methods that you may wish to reference, use, or override in creating your own models. Those listed here are relatively straightforward to use, but consult the Wagtail source code for a full view of what's possible. + +.. automodule:: wagtail.wagtailcore.models +.. autoclass:: Page + + .. autoattribute:: specific + + .. autoattribute:: specific_class + + .. autoattribute:: url + + .. autoattribute:: full_url + + .. automethod:: get_verbose_name + + .. automethod:: relative_url + + .. automethod:: is_navigable + + .. automethod:: route + + .. automethod:: serve + + .. automethod:: get_context + + .. automethod:: get_template + + .. autoattribute:: preview_modes + + .. automethod:: serve_preview + + .. automethod:: get_ancestors + + .. automethod:: get_descendants + + .. automethod:: get_siblings + + .. automethod:: search + + .. attribute:: search_fields + + A list of fields to be indexed by the search engine. See Search docs :ref:`wagtailsearch_indexing_fields` + + .. attribute:: subpage_types + + A whitelist of page models which can be created as children of this page type e.g a ``BlogIndex`` page might allow ``BlogPage``, but not ``JobPage`` e.g + + .. code-block:: python + + class BlogIndex(Page): + subpage_types = ['mysite.BlogPage', 'mysite.BlogArchivePage'] + + .. attribute:: password_required_template + + Defines which template file should be used to render the login form for Protected pages using this model. This overrides the default, defined using ``PASSWORD_REQUIRED_TEMPLATE`` in your settings. See :ref:`private_pages`