|
@@ -251,6 +251,10 @@ The sitemap framework provides a couple convenience classes for common cases:
|
|
|
|
|
|
.. class:: FlatPageSitemap
|
|
|
|
|
|
+ .. deprecated:: 1.8
|
|
|
+
|
|
|
+ Use :class:`django.contrib.flatpages.sitemaps.FlatPageSitemap` instead.
|
|
|
+
|
|
|
The :class:`django.contrib.sitemaps.FlatPageSitemap` class looks at all
|
|
|
publicly visible :mod:`flatpages <django.contrib.flatpages>`
|
|
|
defined for the current :setting:`SITE_ID` (see the
|
|
@@ -275,10 +279,11 @@ The sitemap framework provides a couple convenience classes for common cases:
|
|
|
Example
|
|
|
-------
|
|
|
|
|
|
-Here's an example of a :doc:`URLconf </topics/http/urls>` using both::
|
|
|
+Here's an example of a :doc:`URLconf </topics/http/urls>` using
|
|
|
+:class:`GenericSitemap`::
|
|
|
|
|
|
from django.conf.urls import url
|
|
|
- from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
|
|
|
+ from django.contrib.sitemaps import GenericSitemap
|
|
|
from django.contrib.sitemaps.views import sitemap
|
|
|
from blog.models import Entry
|
|
|
|
|
@@ -287,17 +292,13 @@ Here's an example of a :doc:`URLconf </topics/http/urls>` using both::
|
|
|
'date_field': 'pub_date',
|
|
|
}
|
|
|
|
|
|
- sitemaps = {
|
|
|
- 'flatpages': FlatPageSitemap,
|
|
|
- 'blog': GenericSitemap(info_dict, priority=0.6),
|
|
|
- }
|
|
|
-
|
|
|
urlpatterns = [
|
|
|
# some generic view using info_dict
|
|
|
# ...
|
|
|
|
|
|
# the sitemap
|
|
|
- url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
|
|
|
+ url(r'^sitemap\.xml$', sitemap,
|
|
|
+ {'sitemaps': {'blog': GenericSitemap(info_dict, priority=0.6)}},
|
|
|
name='django.contrib.sitemaps.views.sitemap'),
|
|
|
]
|
|
|
|