26 lines
764 B
Python
26 lines
764 B
Python
from django.urls import path
|
|
from django.views.decorators.cache import cache_page
|
|
|
|
from ocyan.main.urls import urlpatterns as ocyan_urlpatterns
|
|
from ocyan.plugin.wagtail_oscar_integration.constants import CACHE_DURATION
|
|
|
|
from .i18n_views import set_language_normalized
|
|
from .sitemaps import robots_txt, sitemap_index, sitemap_section
|
|
|
|
urlpatterns = [
|
|
path("i18n/setlang/", set_language_normalized, name="set_language"),
|
|
path("robots.txt", robots_txt, name="robots-txt"),
|
|
path(
|
|
"sitemap.xml",
|
|
cache_page(CACHE_DURATION)(sitemap_index),
|
|
name="sitemap-index",
|
|
),
|
|
path(
|
|
"sitemap-<section>.xml",
|
|
cache_page(CACHE_DURATION)(sitemap_section),
|
|
name="sitemaps",
|
|
),
|
|
]
|
|
|
|
urlpatterns += ocyan_urlpatterns
|