Wrapped some lines and added links to docs/ref/contrib/sitemaps.txt.

This commit is contained in:
Tim Graham 2016-03-09 10:00:27 -05:00
parent 593ecfe135
commit a496d10a8c
1 changed files with 21 additions and 16 deletions

View File

@ -123,7 +123,7 @@ Note:
corresponding to a sitemap property (:attr:`~Sitemap.location`, corresponding to a sitemap property (:attr:`~Sitemap.location`,
:attr:`~Sitemap.lastmod`, :attr:`~Sitemap.changefreq`, and :attr:`~Sitemap.lastmod`, :attr:`~Sitemap.changefreq`, and
:attr:`~Sitemap.priority`). :attr:`~Sitemap.priority`).
* :attr:`~Sitemap.lastmod` should return a Python ``datetime`` object. * :attr:`~Sitemap.lastmod` should return a :class:`~datetime.datetime`.
* There is no :attr:`~Sitemap.location` method in this example, but you * There is no :attr:`~Sitemap.location` method in this example, but you
can provide it in order to specify the URL for your object. By default, can provide it in order to specify the URL for your object. By default,
:attr:`~Sitemap.location()` calls ``get_absolute_url()`` on each object :attr:`~Sitemap.location()` calls ``get_absolute_url()`` on each object
@ -173,11 +173,11 @@ Note:
**Optional.** Either a method or attribute. **Optional.** Either a method or attribute.
If it's a method, it should take one argument -- an object as returned by If it's a method, it should take one argument -- an object as returned
:attr:`~Sitemap.items()` -- and return that object's last-modified date/time, as a Python by :attr:`~Sitemap.items()` -- and return that object's last-modified
``datetime.datetime`` object. date/time as a :class:`~datetime.datetime`.
If it's an attribute, its value should be a Python ``datetime.datetime`` object If it's an attribute, its value should be a :class:`~datetime.datetime`
representing the last-modified date/time for *every* object returned by representing the last-modified date/time for *every* object returned by
:attr:`~Sitemap.items()`. :attr:`~Sitemap.items()`.
@ -192,13 +192,15 @@ Note:
**Optional.** Either a method or attribute. **Optional.** Either a method or attribute.
If it's a method, it should take one argument -- an object as returned by If it's a method, it should take one argument -- an object as returned
:attr:`~Sitemap.items()` -- and return that object's change frequency, as a Python string. by :attr:`~Sitemap.items()` -- and return that object's change
frequency as a string.
If it's an attribute, its value should be a string representing the change If it's an attribute, its value should be a string representing the
frequency of *every* object returned by :attr:`~Sitemap.items()`. change frequency of *every* object returned by :attr:`~Sitemap.items()`.
Possible values for :attr:`~Sitemap.changefreq`, whether you use a method or attribute, are: Possible values for :attr:`~Sitemap.changefreq`, whether you use a
method or attribute, are:
* ``'always'`` * ``'always'``
* ``'hourly'`` * ``'hourly'``
@ -212,14 +214,17 @@ Note:
**Optional.** Either a method or attribute. **Optional.** Either a method or attribute.
If it's a method, it should take one argument -- an object as returned by If it's a method, it should take one argument -- an object as returned
:attr:`~Sitemap.items()` -- and return that object's priority, as either a string or float. by :attr:`~Sitemap.items()` -- and return that object's priority as
either a string or float.
If it's an attribute, its value should be either a string or float representing If it's an attribute, its value should be either a string or float
the priority of *every* object returned by :attr:`~Sitemap.items()`. representing the priority of *every* object returned by
:attr:`~Sitemap.items()`.
Example values for :attr:`~Sitemap.priority`: ``0.4``, ``1.0``. The default priority of a Example values for :attr:`~Sitemap.priority`: ``0.4``, ``1.0``. The
page is ``0.5``. See the `sitemaps.org documentation`_ for more. default priority of a page is ``0.5``. See the `sitemaps.org
documentation`_ for more.
.. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef .. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef