mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
This commit is contained in:
parent
df3d5b1d73
commit
16411b8400
117 changed files with 961 additions and 922 deletions
|
@ -300,13 +300,12 @@ Sitemap for static views
|
|||
|
||||
Often you want the search engine crawlers to index views which are neither
|
||||
object detail pages nor flatpages. The solution is to explicitly list URL
|
||||
names for these views in ``items`` and call
|
||||
:func:`~django.core.urlresolvers.reverse` in the ``location`` method of
|
||||
the sitemap. For example::
|
||||
names for these views in ``items`` and call :func:`~django.urls.reverse` in
|
||||
the ``location`` method of the sitemap. For example::
|
||||
|
||||
# sitemaps.py
|
||||
from django.contrib import sitemaps
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
|
||||
class StaticViewSitemap(sitemaps.Sitemap):
|
||||
priority = 0.5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue