Ticket #27307: 27273.diff

File 27273.diff, 1019 bytes (added by Tim Graham, 8 years ago)
  • docs/ref/contrib/sitemaps.txt

    diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
    index 29205c4..d3ce1cd 100644
    a b Here's what the relevant URLconf lines would look like for the example above::  
    363363
    364364    urlpatterns = [
    365365        url(r'^sitemap\.xml$', views.index, {'sitemaps': sitemaps}),
    366         url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps}),
     366        url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps},
     367            name='django.contrib.sitemaps.views.sitemap'),
    367368    ]
    368369
    369370This will automatically generate a :file:`sitemap.xml` file that references
    parameter to the ``sitemap`` and ``index`` views via the URLconf::  
    409410        url(r'^custom-sitemap-(?P<section>.+)\.xml$', views.sitemap, {
    410411            'sitemaps': sitemaps,
    411412            'template_name': 'custom_sitemap.html'
    412         }),
     413        }, name='django.contrib.sitemaps.views.sitemap'),
    413414    ]
    414415
    415416
Back to Top