Skip to content
This repository was archived by the owner on Dec 20, 2022. It is now read-only.

Commit ea9ca8d

Browse files
committed
Add sitemap for organisations
1 parent f11cf48 commit ea9ca8d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: correctiv_justizgelder/sitemaps.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from django.contrib.sitemaps import Sitemap
2+
3+
from .models import Organisation
4+
5+
6+
def update_sitemap(sitemap_dict):
7+
sitemap_dict.update({
8+
'justizgelder-organisations': OrganisationSitemap
9+
})
10+
return sitemap_dict
11+
12+
13+
class OrganisationSitemap(Sitemap):
14+
priority = 0.5
15+
changefreq = 'yearly'
16+
17+
def items(self):
18+
"""
19+
Return published entries.
20+
"""
21+
return Organisation.objects.all()

0 commit comments

Comments
 (0)