You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
742 B
26 lines
742 B
# sitemaps.py
|
|
from django.contrib import sitemaps
|
|
from django.urls import reverse
|
|
|
|
from hpst.models import Termin
|
|
|
|
class StaticViewSitemap(sitemaps.Sitemap):
|
|
priority = 0.5
|
|
changefreq = 'daily'
|
|
|
|
def items(self):
|
|
termine=Termin.objects.filter(Q(date__gte=timezone.now())|Q(end_date__gte=timezone.now())).order_by( 'date')
|
|
return ['index',
|
|
'lamatour',
|
|
'wildnispaedagogik',
|
|
'externereferentin',
|
|
'kinderfreizeit',
|
|
'honigmassage',
|
|
'psychologischeberatung',
|
|
'pflanzenheilkunde',
|
|
'ohrakupunktur',
|
|
'impressum',]
|
|
|
|
def location(self, item):
|
|
return reverse(item)
|
|
|
|
|