Init Django-SHOP
This commit is contained in:
12
weirdlittleempire/sitemap.py
Normal file
12
weirdlittleempire/sitemap.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
from django.conf import settings
|
||||
from weirdlittleempire.models import Product
|
||||
|
||||
|
||||
class ProductSitemap(Sitemap):
|
||||
changefreq = 'monthly'
|
||||
priority = 0.5
|
||||
i18n = settings.USE_I18N
|
||||
|
||||
def items(self):
|
||||
return Product.objects.filter(active=True)
|
||||
Reference in New Issue
Block a user