Sitemaps

General config

# settings.py
INSTALLED_APPS = [
    ...
    'django.contrib.sitemaps',
    ...
]
settings.py

Static pages example

# urls.py
from django.contrib import sitemaps
from django.contrib.sitemaps.views import sitemap
from django.urls import reverse


class StaticViewSitemap(sitemaps.Sitemap):
    priority = 0.5
    changefreq = "daily"

    def items(self):
        return ["url1","url2", etc] # <---- Add url path names here for all your 'static' views

    def location(self, item):
        return reverse(item)

sitemaps = {
    "static": StaticViewSitemap,
}

urlpatterns = [
    path(
        "sitemap.xml",
        sitemap,
        {"sitemaps": sitemaps},
        name="django.contrib.sitemaps.views.sitemap",
    ),
    ...
]
urls.py