Files
postgres-web/pgweb/security/struct.py
Magnus Hagander 368550f2ee Exclude security notices with no CVE from list of CVEs in sitemap
Otherwise we're instructing google and others to index pages that don't
exist.
2021-04-09 15:20:56 +02:00

10 lines
364 B
Python

from datetime import date, timedelta
from .models import SecurityPatch
def get_struct():
"""create sitemap entries for each CVE entry and the top level CVE URL"""
yield ('support/security/', None)
for s in SecurityPatch.objects.filter(public=True).exclude(cve='').order_by('-cvenumber'):
yield ('support/security/CVE-{}'.format(s.cve), None)