diff --git a/docs/advanced_topics/customisation/extending_draftail.rst b/docs/advanced_topics/customisation/extending_draftail.rst
index 9a9a9b74ac..c115c52c56 100644
--- a/docs/advanced_topics/customisation/extending_draftail.rst
+++ b/docs/advanced_topics/customisation/extending_draftail.rst
@@ -1,7 +1,7 @@
Extending the Draftail Editor
=============================
-Wagtail’s rich text editor is built with `Draftail `_, and its functionality can be extended through plugins.
+Wagtail’s rich text editor is built with `Draftail `__, and its functionality can be extended through plugins.
Plugins come in three types:
@@ -61,7 +61,7 @@ These steps will always be the same for all Draftail plugins. The important part
* Give enough information to Draftail so it knows how to make a button for the feature, and how to render it (more on this later).
* Configure the conversion to use the right HTML element (as they are stored in the DB).
-For detailed configuration options, head over to the `Draftail documentation `_ to see all of the details. Here are some parts worth highlighting about controls:
+For detailed configuration options, head over to the `Draftail documentation `__ to see all of the details. Here are some parts worth highlighting about controls:
* The ``type`` is the only mandatory piece of information.
* To display the control in the toolbar, combine ``icon``, ``label`` and ``description``.
@@ -70,7 +70,7 @@ For detailed configuration options, head over to the `Draftail documentation `_ on inline styles.
+In addition to the initial example, inline styles take a ``style`` property to define what CSS rules will be applied to text in the editor. Be sure to read the `Draftail documentation `__ on inline styles.
Finally, the DB to/from conversion uses an ``InlineStyleElementHandler`` to map from a given tag (```` in the example above) to a Draftail type, and the inverse mapping is done with `Draft.js exporter configuration `_ of the ``style_map``.
@@ -145,7 +145,7 @@ Here are the main requirements to create a new entity feature:
* The conversion usually is more involved, since entities contain data that needs to be serialised to HTML.
To write the React components, Wagtail exposes its own React, Draft.js and Draftail dependencies as global variables. Read more about this in :ref:`extending_clientside_components`.
-To go further, please look at the `Draftail documentation `_ as well as the `Draft.js exporter documentation `_.
+To go further, please look at the `Draftail documentation `__ as well as the `Draft.js exporter documentation `_.
Here is a detailed example to showcase how those tools are used in the context of Wagtail.
For the sake of our example, we can imagine a news team working at a financial newspaper.
@@ -325,7 +325,7 @@ To fully complete the demo, we can add a bit of JavaScript to the front-end in o
----
-Custom block entities can also be created (have a look at the separate `Draftail documentation `_), but these are not detailed here since :ref:`StreamField ` is the go-to way to create block-level rich text in Wagtail.
+Custom block entities can also be created (have a look at the separate `Draftail documentation `__), but these are not detailed here since :ref:`StreamField ` is the go-to way to create block-level rich text in Wagtail.
Integration of the Draftail widgets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/advanced_topics/third_party_tutorials.rst b/docs/advanced_topics/third_party_tutorials.rst
index 6e58a520fe..bed300958c 100644
--- a/docs/advanced_topics/third_party_tutorials.rst
+++ b/docs/advanced_topics/third_party_tutorials.rst
@@ -11,7 +11,7 @@ Third-party tutorials
* `E-Commerce for Django developers (with Wagtail shop tutorial) `_ (5 July 2018)
* `Wagtail and GraphQL `_ (19 April 2018)
* `Wagtail and Azure storage blob containers `_ (29 November 2017)
-* `Building TwilioQuest with Twilio Sync, Django [incl. Wagtail], and Vue.js https://www.twilio.com/blog/2017/11/building-twilioquest-with-twilio-sync-django-and-vue-js.html`_ (6 November 2017)
+* `Building TwilioQuest with Twilio Sync, Django [incl. Wagtail], and Vue.js `_ (6 November 2017)
* `Upgrading from Wagtail 1.0 to Wagtail 1.11 `_ (19 July 2017)
* `Wagtail-Multilingual: a simple project to demonstrate how multilingual is implemented `_ (31 January 2017)
* `Wagtail: 2 Steps for Adding Pages Outside of the CMS `_ (15 February 2016)
diff --git a/wagtail/core/models.py b/wagtail/core/models.py
index da1f3bcda1..d15fba45ef 100644
--- a/wagtail/core/models.py
+++ b/wagtail/core/models.py
@@ -1355,12 +1355,24 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
yield '/' + child.slug + path
def get_ancestors(self, inclusive=False):
+ """
+ Returns a queryset of the current page's ancestors, starting at the root page
+ and descending to the parent, or to the current page itself if ``inclusive`` is true.
+ """
return Page.objects.ancestor_of(self, inclusive)
def get_descendants(self, inclusive=False):
+ """
+ Returns a queryset of all pages underneath the current page, any number of levels deep.
+ If ``inclusive`` is true, the current page itself is included in the queryset.
+ """
return Page.objects.descendant_of(self, inclusive)
def get_siblings(self, inclusive=True):
+ """
+ Returns a queryset of all other pages with the same parent as the current page.
+ If ``inclusive`` is true, the current page itself is included in the queryset.
+ """
return Page.objects.sibling_of(self, inclusive)
def get_next_siblings(self, inclusive=False):