2017-10-25 17:46:48 -04: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-03 20:16:09 -04:00
|
|
|
|
2017-10-25 17:46:48 -04:00
|
|
|
def location(self, entry):
|
|
|
|
return entry.url
|