summaryrefslogtreecommitdiffstats
path: root/sitemaps.py
blob: 9e2ef856825218583fab23d0433e6eefb0e888a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django.contrib.sitemaps import Sitemap
from archweb.main.models import Package, News

class PackagesSitemap(Sitemap):
    changefreq = "monthly"
    priority = "0.4"

    def items(self):
        return Package.objects.all()

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

class NewsSitemap(Sitemap):
    changefreq = "never"
    priority = "0.7"

    def items(self):
        return News.objects.all()

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

# vim: set ts=4 sw=4 et: