lemoncurry/entries/sitemaps.py

14 lines
277 B
Python
Raw Permalink Normal View History

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