1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
from wlhelp.models import Tribe, Building, Ware, Worker
from mainpage.sitemaps import SitemapHTTPS
class WlHelpTribeSitemap(SitemapHTTPS):
changefreq = 'yearly'
priority = 0.5
def items(self):
return Tribe.objects.all()
def location(self, obj):
return '/encyclopedia/%s' % obj.name
class WlHelpBuildingSitemap(SitemapHTTPS):
changefreq = 'yearly'
priority = 0.5
def items(self):
return Building.objects.all()
def location(self, obj):
return '/encyclopedia/%s/buildings/%s' % (obj.tribe.name, obj.name)
class WlHelpWareSitemap(SitemapHTTPS):
changefreq = 'yearly'
priority = 0.5
def items(self):
return Ware.objects.all()
def location(self, obj):
return '/encyclopedia/%s/wares/%s' % (obj.tribe.name, obj.name)
class WlHelpWorkerSitemap(SitemapHTTPS):
changefreq = 'yearly'
priority = 0.5
def items(self):
return Worker.objects.all()
def location(self, obj):
return '/encyclopedia/%s/workers/%s' % (obj.tribe.name, obj.name)
|