mirror of
https://github.com/django/django.git
synced 2024-12-23 17:46:27 +00:00
21 lines
475 B
Python
21 lines
475 B
Python
from django.conf.urls import url
|
|
from django.contrib.sitemaps import views
|
|
|
|
from .http import SimpleSitemap
|
|
|
|
|
|
class HTTPSSitemap(SimpleSitemap):
|
|
protocol = 'https'
|
|
|
|
|
|
secure_sitemaps = {
|
|
'simple': HTTPSSitemap,
|
|
}
|
|
|
|
urlpatterns = [
|
|
url(r'^secure/index\.xml$', views.index, {'sitemaps': secure_sitemaps}),
|
|
url(r'^secure/sitemap-(?P<section>.+)\.xml$', views.sitemap,
|
|
{'sitemaps': secure_sitemaps},
|
|
name='django.contrib.sitemaps.views.sitemap'),
|
|
]
|