Django Book 翻译
菜单>:
TOC
返回
原文:
To use it, create an instance, passing in the same ``info_dict`` you pass to the generic views. The only requirement is that the dictionary have a ``queryset`` entry. It may also have a ``date_field`` entry that specifies a date field for objects retrieved from the ``queryset`` . This will be used for the ``lastmod`` attribute in the generated sitemap. You may also pass ``priority`` and ``changefreq`` keyword arguments to the ``GenericSitemap`` constructor to specify these attributes for all URLs.
翻译:
你可以如下使用它,创建一个实例,并通过 ``info_dict`` 传递给通用视图。唯一的要求是字典包含 ``queryset`` 这一项。也可以用 ``date_field`` 来指明从 ``queryset`` 中取回的对象的日期域。这会被用作站点地图中的 ``lastmod`` 属性。你也可以向 ``GenericSitemap`` 的构造函数传递 ``priority`` 和 ``changefreq`` 来指定所有URL的相应属性。
备注:
译者: