我正在尝试使用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个blog对象的优先级设置为1.0,其余的设置为1.0 作为0.5优先级。在
我读了documentation,但没有办法摆脱它。在
任何帮助都是值得赞赏的。提前谢谢。在
类似的方法可能会奏效:
我想你可以改变每个对象的优先级。比如说:
相关问题 更多 >
编程相关推荐