mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #22384 -- Deprecated reversing URLs by dotted path.
This commit is contained in:
parent
e020894470
commit
4445d36d47
16 changed files with 134 additions and 114 deletions
|
@ -54,7 +54,8 @@ Initialization
|
|||
To activate sitemap generation on your Django site, add this line to your
|
||||
:doc:`URLconf </topics/http/urls>`::
|
||||
|
||||
(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
|
||||
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
|
||||
{'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap')
|
||||
|
||||
This tells Django to build a sitemap when a client accesses :file:`/sitemap.xml`.
|
||||
|
||||
|
@ -284,7 +285,8 @@ Here's an example of a :doc:`URLconf </topics/http/urls>` using both::
|
|||
# ...
|
||||
|
||||
# the sitemap
|
||||
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
|
||||
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
|
||||
{'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
|
||||
]
|
||||
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
@ -325,7 +327,8 @@ the sitemap. For example::
|
|||
url(r'^about/$', 'views.about', name='about'),
|
||||
url(r'^license/$', 'views.license', name='license'),
|
||||
# ...
|
||||
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
|
||||
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
|
||||
{'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap')
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue