Django sitemap change base url
Solved, I redefined my own get_urls. It works:
class MySitemap(Sitemap):
changefreq = "never"
priority = 0.5
location = ""
def get_urls(self, site=None, **kwargs):
site = Site(domain='mydomain.com', name='mydomain.com')
return super(MySitemap, self).get_urls(site=site, **kwargs)
def items(self):
return MyObj.objects.all().order_by('pk')[:1000]
def lastmod(self, obj):
return obj.timestamp