Source code for merchandise.sitemaps

"""Gives sitemaps for the merchandise package."""
from django.contrib import sitemaps
from django.urls import reverse


[docs]class StaticViewSitemap(sitemaps.Sitemap): """Generate the sitemap of the index page.""" changefreq = "monthly"
[docs] def items(self): """Items listed in the sitemap.""" return ["merchandise:index"]
[docs] def location(self, item): """Give the location for the specified item. :param item: the item to generate the link to :return: the URL to the item """ return reverse(item)
#: The site maps defined by this module sitemap = { "merchandise-static": StaticViewSitemap, }