2017-10-26 08:46:48 +11:00
|
|
|
from django.contrib import sitemaps
|
|
|
|
|
from .models import Entry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EntriesSitemap(sitemaps.Sitemap):
|
|
|
|
|
def items(self):
|
|
|
|
|
return Entry.objects.all()
|
|
|
|
|
|
|
|
|
|
def lastmod(self, entry):
|
|
|
|
|
return entry.updated
|
2018-06-04 10:16:09 +10:00
|
|
|
|
2017-10-26 08:46:48 +11:00
|
|
|
def location(self, entry):
|
|
|
|
|
return entry.url
|