Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Sitemap internalization
Pacu275840e85345e
diff --git a/saleor/core/sitemaps.py b/saleor/core/sitemaps.pyindex d968c4120f..e7923f9cc2 100644--- a/saleor/core/sitemaps.py+++ b/saleor/core/sitemaps.py@@ -1,30 +1,36 @@+from django.conf import settingsfrom django.contrib.sitemaps import Sitemapfrom ..page.models import Pagefrom ..product.models import Category, Collection, Product-class ProductSitemap(Sitemap):+class i18nSitemap(Sitemap):+ protocol = 'https' if settings.ENABLE_SSL else 'http'+ i18n = True+++class ProductSitemap(i18nSitemap):def items(self):return Product.objects.only('id', 'name').order_by('-id')-class CategorySitemap(Sitemap):+class CategorySitemap(i18nSitemap):def items(self):categories = Category.objects.all().order_by('id')return categories.only('id', 'name', 'slug')-class CollectionSitemap(Sitemap):+class CollectionSitemap(i18nSitemap):def items(self):collections = Collection.objects.all().order_by('id')return collections.only('id', 'name', 'slug')-class PageSitemap(Sitemap):+class PageSitemap(i18nSitemap):def items(self):posts = Page.objects.public()