mirror of
https://github.com/django/django.git
synced 2024-11-24 11:48:10 +01:00
22 lines
468 B
Python
22 lines
468 B
Python
from django.contrib.sitemaps import views
|
|
from django.urls import path
|
|
|
|
from .http import SimpleSitemap
|
|
|
|
|
|
class HTTPSSitemap(SimpleSitemap):
|
|
protocol = 'https'
|
|
|
|
|
|
secure_sitemaps = {
|
|
'simple': HTTPSSitemap,
|
|
}
|
|
|
|
urlpatterns = [
|
|
path('secure/index.xml', views.index, {'sitemaps': secure_sitemaps}),
|
|
path(
|
|
'secure/sitemap-<section>.xml', views.sitemap,
|
|
{'sitemaps': secure_sitemaps},
|
|
name='django.contrib.sitemaps.views.sitemap'),
|
|
]
|