Ticket #15829: sitemaps-item.2.diff

File sitemaps-item.2.diff, 1.3 KB (added by manfre, 4 years ago)

patch with docs

  • django/contrib/sitemaps/__init__.py

    diff -r 25c7466925f7 django/contrib/sitemaps/__init__.py
    a b  
    7979                'location':   loc,
    8080                'lastmod':    self.__get('lastmod', item, None),
    8181                'changefreq': self.__get('changefreq', item, None),
    82                 'priority':   str(priority is not None and priority or '')
     82                'priority':   str(priority is not None and priority or ''),
     83                'item':       item,
    8384            }
    8485            urls.append(url_info)
    8586        return urls
  • docs/ref/contrib/sitemaps.txt

    diff -r 25c7466925f7 docs/ref/contrib/sitemaps.txt
    a b  
    313313        }),
    314314    )
    315315
     316Index
     317-----
     318
     319The variable `sitemaps` is a list of absolute URLs to each of the sitemaps.
     320
     321Sitemap
     322-------
     323
     324The variable `urlset` is a list of each URLs that should appear in the sitemap. Each URL exposes `changefreq`, `item`, `lastmod`, `location` and `priority`.
     325
     326.. versionadded:: SVN
     327
     328The `item` object has been added for each URL to allow for more flexible customization.
     329
    316330Pinging Google
    317331==============
    318332
Back to Top