summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/sitemaps.txt9
-rw-r--r--docs/releases/4.2.txt3
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
index d3225405a3..7dc3dced51 100644
--- a/docs/ref/contrib/sitemaps.txt
+++ b/docs/ref/contrib/sitemaps.txt
@@ -311,6 +311,15 @@ Note:
The latest ``lastmod`` returned by calling the method with all
items returned by :meth:`Sitemap.items`.
+ .. method:: Sitemap.get_languages_for_item(item, lang_code)
+
+ .. versionadded:: 4.2
+
+ **Optional.** A method that returns the sequence of language codes for
+ which the item is displayed. By default
+ :meth:`~Sitemap.get_languages_for_item` returns
+ :attr:`~Sitemap.languages`.
+
Shortcuts
=========
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index 682fce2a53..7e93df0702 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -145,7 +145,8 @@ Minor features
:mod:`django.contrib.sitemaps`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* ...
+* The new :meth:`.Sitemap.get_languages_for_item` method allows customizing the
+ list of languages for which the item is displayed.
:mod:`django.contrib.sites`
~~~~~~~~~~~~~~~~~~~~~~~~~~~