diff --git a/docs/advanced_topics/i18n/duplicate_tree.rst b/docs/advanced_topics/i18n/duplicate_tree.rst index 3c6f7be2aa..010f18e91f 100644 --- a/docs/advanced_topics/i18n/duplicate_tree.rst +++ b/docs/advanced_topics/i18n/duplicate_tree.rst @@ -131,14 +131,14 @@ You can make use of these methods in your template by doing: .. code-block:: html+django - {% if self.english_page and self.get_language != 'en' %} - {% trans "View in English" %} + {% if page.english_page and page.get_language != 'en' %} + {% trans "View in English" %} {% endif %} - {% if self.french_page and self.get_language != 'fr' %} - {% trans "View in French" %} + {% if page.french_page and page.get_language != 'fr' %} + {% trans "View in French" %} {% endif %} - {% if self.spanish_page and self.get_language != 'es' %} - {% trans "View in Spanish" %} + {% if page.spanish_page and page.get_language != 'es' %} + {% trans "View in Spanish" %} {% endif %} diff --git a/docs/advanced_topics/i18n/index.rst b/docs/advanced_topics/i18n/index.rst index e2001c060e..2a7c7e507e 100644 --- a/docs/advanced_topics/i18n/index.rst +++ b/docs/advanced_topics/i18n/index.rst @@ -198,9 +198,9 @@ Finally, in the template, reference the accessors instead of the underlying data .. code-block:: html+django - {{ self.translated_title }} + {{ page.translated_title }} - {{ self.body }} + {{ page.body }} Other approaches diff --git a/docs/advanced_topics/privacy.rst b/docs/advanced_topics/privacy.rst index eeb03a5244..4f59b6b922 100644 --- a/docs/advanced_topics/privacy.rst +++ b/docs/advanced_topics/privacy.rst @@ -17,7 +17,7 @@ By setting ``PASSWORD_REQUIRED_TEMPLATE`` in your Django settings file, you can PASSWORD_REQUIRED_TEMPLATE = 'myapp/password_required.html' -This template will receive the same set of context variables that the blocked page would pass to its own template via ``get_context()`` - including ``self`` to refer to the page object itself - plus the following additional variables (which override any of the page's own context variables of the same name): +This template will receive the same set of context variables that the blocked page would pass to its own template via ``get_context()`` - including ``page`` to refer to the page object itself - plus the following additional variables (which override any of the page's own context variables of the same name): - **form** - A Django form object for the password prompt; this will contain a field named ``password`` as its only visible field. A number of hidden fields may also be present, so the page must loop over ``form.hidden_fields`` if not using one of Django's rendering helpers such as ``form.as_p``. - **action_url** - The URL that the password form should be submitted to, as a POST request. diff --git a/docs/getting_started/tutorial.rst b/docs/getting_started/tutorial.rst index 45839fa5ea..cf9991199e 100644 --- a/docs/getting_started/tutorial.rst +++ b/docs/getting_started/tutorial.rst @@ -97,7 +97,7 @@ home\_page.html). Edit {% block body_class %}template-homepage{% endblock %} {% block content %} - {{ self.body|richtext }} + {{ page.body|richtext }} {% endblock %} .. figure:: ../_static/images/tutorial/tutorial_3.png @@ -118,7 +118,7 @@ of a ``RichTextField``: .. code-block:: html+django {% load wagtailcore_tags %} - {{ self.body|richtext }} + {{ page.body|richtext }} Produces: @@ -182,12 +182,12 @@ Create a template at ``blog/templates/blog/blog_page.html``: {% block body_class %}template-blogpage{% endblock %} {% block content %} -