Django Book 翻译
菜单>:
TOC
返回
原文:
To specify the contents of ``
`` , you have two options. For each item in ``items()`` , Django first tries executing a ``get_absolute_url()`` method on that object. If that method doesnt exist, it tries calling a method ``item_link()`` in the ``Feed`` class, passing it a single parameter, ``item`` , which is the object itself.
翻译:
你有两种方法来指定 ``
`` 的内容。 Django 首先执行 ``items()`` 中每一项的 ``get_absolute_url()`` 方法。 如果该方法不存在,就会尝试执行 ``Feed`` 类中的 ``item_link()`` 方法,并将自身作为 ``item`` 参数传递进去。
备注:
译者: