17 lines
458 B
Python
17 lines
458 B
Python
"""To geneate a Sitemap with all events."""
|
|
from kasu.sitemaps import GenericSitemap
|
|
from django.utils import timezone
|
|
from .models import Event
|
|
|
|
|
|
class EventSitemap(GenericSitemap):
|
|
"""sitemap to help indexing all events on this site."""
|
|
changefreq = "never"
|
|
protocol = 'https'
|
|
priority_field = 'start'
|
|
|
|
@staticmethod
|
|
def items():
|
|
"""add all upcoming and archived events to the sitemap."""
|
|
return Event.objects.all()
|