“ author_link”在Django企业联合供稿框架中不起作用

时间:2019-04-11 18:13:52

标签: django rss atom-feed

在RSS / ATOM供稿的Django Feed class reference中,我们有下一个字段:

# AUTHOR LINK --One of the following three is optional. The framework
# looks for them in this order. In each case, the URL should include
# the "http://" and domain name.

def author_link(self, obj):
    """
    Takes the object returned by get_object() and returns the feed's
    author's URL as a normal Python string.
    """

def author_link(self):
    """
    Returns the feed's author's URL as a normal Python string.
    """

author_link = 'https://www.example.com/' # Hard-coded author URL.

这3个选项中的任何一个都不起作用。我的Django项目中有RSS / ATOM供稿。其他所有字段均正常运行:项目,说明,作者等。但是,我在RSS中看不到任何“作者链接”。

0 个答案:

没有答案