from django.contrib.sitemaps import Sitemap
from blog.models import Entry

class FileFieldSitemap(Sitemap):
    changefreq = "never"
    priority = 0.5

    def items(self):
        return [e.file for e in Entry.objects.all() if bool(e.file) is not False]

    def location(self, item):
        return item.url