I have more than 100,000,000 page URLs, how can I make the QuerySet be dynamic in the sense that each class will have 10,000 unique URLs without manually creating the integers in 10,000 classes?
# sitemap.py account_
from django.contrib.sitemaps import Sitemap
from django.shortcuts import reverse
from appname.models import Page
import datetime
from appname.sitemaps import Page000001
from appname.sitemaps import Page000002
ps_dict_01 = {
"ps_file_000001": Page000001,
"ps_file_000002": Page000002,
{
class Page000001(Sitemap):
def items(self):
return Passage.objects.all()[:10000]
lastmod = datetime.datetime.now()
changefreq = 'hourly'
priority = 1.0
protocol = 'http'
class Page000002(Sitemap):
def items(self):
return Passage.objects.all()[10000:20000]
lastmod = datetime.datetime.now()
changefreq = 'hourly'
priority = 1.0
protocol = 'http'