mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed imports in Sitemap for static views
example
This commit is contained in:
parent
2ca244aae6
commit
344f37718b
@ -314,11 +314,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'
|
||||
@ -331,7 +328,10 @@ the sitemap. For example::
|
||||
|
||||
# urls.py
|
||||
from django.conf.urls import url
|
||||
from django.contrib.sitemaps.views import sitemap
|
||||
|
||||
from .sitemaps import StaticViewSitemap
|
||||
from . import views
|
||||
|
||||
sitemaps = {
|
||||
'static': StaticViewSitemap,
|
||||
|
Loading…
Reference in New Issue
Block a user