[1.7.x] Fixed imports in `Sitemap for static views` example
Backport of 344f37718b
from master
This commit is contained in:
parent
676db20824
commit
368e5cea58
|
@ -305,11 +305,8 @@ the sitemap. For example::
|
|||
|
||||
# sitemaps.py
|
||||
from django.contrib import sitemaps
|
||||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from . import views
|
||||
|
||||
class StaticViewSitemap(sitemaps.Sitemap):
|
||||
priority = 0.5
|
||||
changefreq = 'daily'
|
||||
|
@ -322,7 +319,10 @@ the sitemap. For example::
|
|||
|
||||
# urls.py
|
||||
from django.conf.urls import patterns, url
|
||||
from django.contrib.sitemaps.views import sitemap
|
||||
|
||||
from .sitemaps import StaticViewSitemap
|
||||
from . import views
|
||||
|
||||
sitemaps = {
|
||||
'static': StaticViewSitemap,
|
||||
|
|
Loading…
Reference in New Issue