from django.contrib.sitemaps import Sitemap

from models import FeedItem



# noinspection PyMethodMayBeStatic
class FeedItemSitemap(Sitemap):
    changefreq = "never"
    priority = 0.5

    def items(self):
        return FeedItem.objects.get_recent_items()

    def lastmod(self, obj):
        return obj.date_modified
