Coverage for website/merchandise/sitemaps.py: 100.00%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.7, created at 2025-08-14 10:31 +0000

1from django.contrib import sitemaps 

2from django.urls import reverse 

3 

4 

5class StaticViewSitemap(sitemaps.Sitemap): 

6 """Generate the sitemap of the index page.""" 

7 

8 changefreq = "monthly" 

9 

10 def items(self): 

11 """Items listed in the sitemap.""" 

12 return ["merchandise:index"] 

13 

14 def location(self, item): 

15 """Give the location for the specified item. 

16 

17 :param item: the item to generate the link to 

18 :return: the URL to the item 

19 """ 

20 return reverse(item) 

21 

22 

23#: The site maps defined by this module 

24sitemap = { 

25 "merchandise-static": StaticViewSitemap, 

26}