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