Commit 91ea9ecc authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'fix/sitemaps' into 'master'

Fix activemembers sitemap

See merge request !994
parents 875e67ee 16d2632d
......@@ -9,7 +9,8 @@ class StaticViewSitemap(sitemaps.Sitemap):
changefreq = 'daily'
def items(self):
return ['activemembers:committees', 'activemembers:boards']
return ['activemembers:committees', 'activemembers:societies',
def location(self, item):
return reverse(item)
......@@ -18,7 +19,16 @@ class StaticViewSitemap(sitemaps.Sitemap):
class CommitteeSitemap(sitemaps.Sitemap):
def items(self):
return models.Committee.active_committees.all()
return models.Committee.active_objects.all()
def location(self, item):
return item.get_absolute_url()
class SocietySitemap(sitemaps.Sitemap):
def items(self):
return models.Society.active_objects.all()
def location(self, item):
return item.get_absolute_url()
......@@ -37,5 +47,6 @@ class BoardSitemap(sitemaps.Sitemap):
sitemap = {
'activemembers-static': StaticViewSitemap,
'activemembers-committees': CommitteeSitemap,
'activemembers-societies': SocietySitemap,
'activemembers-boards': BoardSitemap,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment