django1/tests/sitemaps_tests/urls/https.py

21 lines
475 B
Python
Raw Normal View History

from django.conf.urls import url
from django.contrib.sitemaps import views
from .http import SimpleSitemap
2013-11-03 04:12:09 +08:00
class HTTPSSitemap(SimpleSitemap):
protocol = 'https'
2016-11-13 01:11:23 +08:00
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'),
]