# CCS CS Lab Main Sitemaps # # Douglas Thrift # # $Id$ from ccscslab.main.models import Computer, Person, Role from django.contrib.sitemaps import Sitemap class MainSitemap(Sitemap): def items(self): return ['/', '/people', '/computers', '/account'] def location(self, item): return item def changefreq(self, item): return 'monthly' if item == '/account' else 'hourly' def priority(self, item): return 1.0 if item == '/' else 0.9 class PersonSitemap(Sitemap): changefreq = 'hourly' priority = 0.8 def items(self): return Person.objects.all() class ComputerSitemap(Sitemap): changefreq = 'hourly' priority = 0.8 def items(self): return Computer.objects.all() class RoleSitemap(Sitemap): changefreq = 'hourly' priority = 0.7 def items(self): return Role.objects.all()