Moved page fields reference into reference section

pull/1011/head
Karl Hobley 2015-02-19 16:53:24 +00:00
rodzic 27b43b4a68
commit 096d1fd42c
3 zmienionych plików z 59 dodań i 61 usunięć
docs
core_components/pages

Wyświetl plik

@ -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
~~~~

Wyświetl plik

@ -7,3 +7,4 @@ Reference
management_commands
project_template
page

Wyświetl plik

@ -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`