Changed FlatpageSitemap to FlatPageSitemap, to be consistent with FlatPage model
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0a11c82b04
commit
a30653ac54
|
@ -64,7 +64,7 @@ class Sitemap:
|
||||||
urls.append(url_info)
|
urls.append(url_info)
|
||||||
return urls
|
return urls
|
||||||
|
|
||||||
class FlatpageSitemap(Sitemap):
|
class FlatPageSitemap(Sitemap):
|
||||||
def items(self):
|
def items(self):
|
||||||
from django.contrib.sites.models import Site
|
from django.contrib.sites.models import Site
|
||||||
current_site = Site.objects.get_current()
|
current_site = Site.objects.get_current()
|
||||||
|
|
|
@ -208,13 +208,13 @@ Shortcuts
|
||||||
|
|
||||||
The sitemap framework provides a couple convenience classes for common cases:
|
The sitemap framework provides a couple convenience classes for common cases:
|
||||||
|
|
||||||
``FlatpageSitemap``
|
``FlatPageSitemap``
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
The ``FlatpageSitemap`` class looks at all flatpages_ defined for the current
|
The ``django.contrib.sitemaps.FlatPageSitemap`` class looks at all flatpages_
|
||||||
``SITE_ID`` (see the `sites documentation`_) and creates an entry in the
|
defined for the current ``SITE_ID`` (see the `sites documentation`_) and
|
||||||
sitemap. These entries include only the ``location`` attribute -- not
|
creates an entry in the sitemap. These entries include only the ``location``
|
||||||
``lastmod``, ``changefreq`` or ``priority``.
|
attribute -- not ``lastmod``, ``changefreq`` or ``priority``.
|
||||||
|
|
||||||
.. _flatpages: http://www.djangoproject.com/documentation/flatpages/
|
.. _flatpages: http://www.djangoproject.com/documentation/flatpages/
|
||||||
.. _sites documentation: http://www.djangoproject.com/documentation/sites/
|
.. _sites documentation: http://www.djangoproject.com/documentation/sites/
|
||||||
|
@ -239,7 +239,7 @@ Example
|
||||||
Here's an example of a URLconf_ using both::
|
Here's an example of a URLconf_ using both::
|
||||||
|
|
||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
from django.contrib.sitemap import FlatpageSitemap, GenericSitemap
|
from django.contrib.sitemap import FlatPageSitemap, GenericSitemap
|
||||||
from mysite.blog.models import Entry
|
from mysite.blog.models import Entry
|
||||||
|
|
||||||
info_dict = {
|
info_dict = {
|
||||||
|
@ -248,7 +248,7 @@ Here's an example of a URLconf_ using both::
|
||||||
}
|
}
|
||||||
|
|
||||||
sitemaps = {
|
sitemaps = {
|
||||||
'flatpages': FlatpageSitemap,
|
'flatpages': FlatPageSitemap,
|
||||||
'blog': GenericSitemap(info_dict, priority=0.6),
|
'blog': GenericSitemap(info_dict, priority=0.6),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue