Add a simple sitemap using django.contrib.sitemaps - there aren't a lot of pages to map so far so it's pretty basic ;)

This commit is contained in:
Danielle McLean 2017-10-24 21:14:17 +11:00
parent f5f4a1d03f
commit 501c91bd12
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 28 additions and 3 deletions

12
home/sitemaps.py Normal file
View file

@ -0,0 +1,12 @@
from django.contrib import sitemaps
from django.urls import reverse
class HomeSitemap(sitemaps.Sitemap):
changefreq = 'daily'
def items(self):
return ('home:index',)
def location(self, item):
return reverse(item)