2014-04-02 08:46:34 +08:00
|
|
|
from django.contrib.sitemaps import views
|
2018-12-08 06:52:28 +08:00
|
|
|
from django.urls import path
|
2012-01-30 03:24:32 +08:00
|
|
|
|
|
|
|
from .http import SimpleSitemap
|
|
|
|
|
2013-11-03 04:12:09 +08:00
|
|
|
|
2012-01-30 03:24:32 +08:00
|
|
|
class HTTPSSitemap(SimpleSitemap):
|
|
|
|
protocol = 'https'
|
|
|
|
|
2016-11-13 01:11:23 +08:00
|
|
|
|
2012-01-30 03:24:32 +08:00
|
|
|
secure_sitemaps = {
|
|
|
|
'simple': HTTPSSitemap,
|
|
|
|
}
|
|
|
|
|
2014-04-02 08:46:34 +08:00
|
|
|
urlpatterns = [
|
2018-12-08 06:52:28 +08:00
|
|
|
path('secure/index.xml', views.index, {'sitemaps': secure_sitemaps}),
|
|
|
|
path(
|
|
|
|
'secure/sitemap-<section>.xml', views.sitemap,
|
2014-09-19 06:40:51 +08:00
|
|
|
{'sitemaps': secure_sitemaps},
|
|
|
|
name='django.contrib.sitemaps.views.sitemap'),
|
2014-04-02 08:46:34 +08:00
|
|
|
]
|