~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to docs/ref/contrib/sitemaps.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115191533-xbt1ut2xf4fvwtvc
Tags: 1.0.1-0ubuntu1
* New upstream release:
  - Bug fixes.

* The tests/ sub-directory appaers to have been dropped upstream, so pull
  our patch to workaround the tests and modify the rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
    * The :func:`django.contrib.sitemaps.views.sitemap` view should take a
279
279
      :data:`section` keyword argument.
280
280
 
281
 
Here is what the relevant URLconf lines would look like for the example above::
 
281
Here's what the relevant URLconf lines would look like for the example above::
282
282
 
283
 
   (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps})
284
 
   (r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
 
283
   (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps}),
 
284
   (r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
285
285
 
286
286
This will automatically generate a :file:`sitemap.xml` file that references both
287
287
:file:`sitemap-flatpages.xml` and :file:`sitemap-blog.xml`. The
288
288
:class:`~django.contrib.sitemaps.Sitemap` classes and the :data:`sitemaps` dict
289
289
don't change at all.
290
290
 
291
 
If one of your sitemaps is going to have more than 50,000 URLs you should 
292
 
create an index file. Your sitemap will be paginated and the index will 
293
 
reflect that.
 
291
You should create an index file if one of your sitemaps has more than 50,000
 
292
URLs. In this case, Django will automatically paginate the sitemap, and the
 
293
index will reflect that.
294
294
 
295
295
Pinging Google
296
296
==============