Ticket #11358: 11358.patch

File 11358.patch, 1.3 KB (added by Mark Lavin, 14 years ago)

Patch against [13710] for change and doc change

  • django/contrib/sitemaps/__init__.py

     
    7979    def items(self):
    8080        from django.contrib.sites.models import Site
    8181        current_site = Site.objects.get_current()
    82         return current_site.flatpage_set.all()
     82        return current_site.flatpage_set.filter(registration_required=False)
    8383
    8484class GenericSitemap(Sitemap):
    8585    priority = None
  • docs/ref/contrib/sitemaps.txt

     
    217217    The :class:`django.contrib.sitemaps.FlatPageSitemap` class looks at all
    218218    :mod:`flatpages <django.contrib.flatpages>` defined for the current
    219219    :setting:`SITE_ID` (see the
    220     :mod:`sites documentation <django.contrib.sites>`) and
     220    :mod:`sites documentation <django.contrib.sites>`)
     221    where :attr:`~Flatpage.registration_required`\=False and
    221222    creates an entry in the sitemap. These entries include only the
    222223    :attr:`~Sitemap.location` attribute -- not :attr:`~Sitemap.lastmod`,
    223224    :attr:`~Sitemap.changefreq` or :attr:`~Sitemap.priority`.
Back to Top