【发布时间】:2010-10-20 07:03:01
【问题描述】:
我正在尝试使用 Django 站点地图。
class BlogSiteMap(Sitemap):
"""A simple class to get sitemaps for blog"""
changefreq = 'hourly'
priority = 0.5
def items(self):
return Blog.objects.order_by('-pubDate')
def lastmod(self, obj):
return obj.pubDate
我的问题是..我想将前 3 个博客对象的优先级设置为 1.0,其余的 作为 0.5 优先级。
我阅读了documentation,但无法摆脱它。
任何帮助都将不胜感激。提前致谢。
【问题讨论】: