From 9f21e35100b022b31fe723323db85c2cb28b16b8 Mon Sep 17 00:00:00 2001 From: Alexey Opalev Date: Wed, 15 Feb 2017 14:36:18 +0500 Subject: Fixed #27842 -- Added protocol kwarg to GenericSitemap.__init__(). --- docs/ref/contrib/sitemaps.txt | 15 ++++++++++----- docs/releases/2.0.txt | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index fb3871e58e..aebf62ac53 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -259,7 +259,7 @@ Shortcuts The sitemap framework provides a convenience class for a common case: -.. class:: GenericSitemap +.. class:: GenericSitemap(info_dict, priority=None, changefreq=None, protocol=None) The :class:`django.contrib.sitemaps.GenericSitemap` class allows you to create a sitemap by passing it a dictionary which has to contain at least @@ -267,10 +267,15 @@ The sitemap framework provides a convenience class for a common case: of the sitemap. It may also have a ``date_field`` entry that specifies a date field for objects retrieved from the ``queryset``. This will be used for the :attr:`~Sitemap.lastmod` attribute in the - generated sitemap. You may also pass :attr:`~Sitemap.priority` and - :attr:`~Sitemap.changefreq` keyword arguments to the - :class:`~django.contrib.sitemaps.GenericSitemap` constructor to specify - these attributes for all URLs. + generated sitemap. + + The :attr:`~Sitemap.priority`, :attr:`~Sitemap.changefreq`, + and :attr:`~Sitemap.protocol` keyword arguments allow specifying these + attributes for all URLs. + + .. versionadded:: 2.0 + + The ``protocol`` keyword argument was added. Example ------- diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index ad78c84fe5..cd222dbba0 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -89,7 +89,8 @@ Minor features :mod:`django.contrib.sitemaps` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* ... +* Added the ``protocol`` keyword argument to the + :class:`~django.contrib.sitemaps.GenericSitemap` constructor. :mod:`django.contrib.sites` ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3