Ticket #11693: 11693.diff
File 11693.diff, 1.3 KB (added by , 15 years ago) |
---|
-
docs/ref/contrib/sitemaps.txt
54 54 To activate sitemap generation on your Django site, add this line to your 55 55 :ref:`URLconf <topics-http-urls>`:: 56 56 57 (r'^sitemap .xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})57 (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}) 58 58 59 59 This tells Django to build a sitemap when a client accesses :file:`/sitemap.xml`. 60 60 … … 261 261 # ... 262 262 263 263 # the sitemap 264 (r'^sitemap .xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})264 (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}) 265 265 ) 266 266 267 267 .. _URLconf: ../url_dispatch/ … … 280 280 281 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}),283 (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps}), 284 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