All the examples I have seen for generating sitemaps in Django seem to iterate over a model, to generate URLs that way.
For example, from the Django documentation:
class BlogSitemap(Sitemap):
changefreq = "never"
priority = 0.5
def items(self):
return Entry.objects.filter(is_draft=False)
def lastmod(self, obj):
return obj.pub_date
I can't do this with my web application. I have thousands of URLs that correspond to product pages, that are generated using django, based on data retrieved from an API that was directly inserted into a postgres database.
So, I am using django to retrieve records from the database and shape how they are presented, but the URLs I have do not correspond to any django model (this is something that will be improved and changed in the future).
Is there a way then, that I can specify specific URLs in a sitemap without iterating over a model?