简体   繁体   English

Django Feeds / Syndication-函数item_title和item_description不影响显示的内容吗?

[英]Django Feeds/Syndication - The functions item_title and item_description do not effect whats displayed?

Ive defined aa class that inherits from django.contrib.syndication.feeds.Feed 我已经定义了一个继承自django.contrib.syndication.feeds.Feed的类

class Rss(Feed):
...
    def item_title(self, item):
       return "Hello"

    def item_description(self, item):
       return "Test"

The issue is whats returned from the methods item_title and item_description is not what is used in the feed, even when not using a template. 问题是从方法item_title返回的内容和feed_description不是供稿中使用的内容,即使不使用模板也是如此。

Am I missing something? 我想念什么吗?

Are you using a recent trunk checkout, or version 1.1 or earlier? 您使用的是最近的中继线结帐,还是版本1.1或更早版本? The item_title etc fields were only introduced since 1.1 was released. 自1.1版本发布以来,才引入了item_title等字段。

If you're using 1.1, you should refer to the 1.1 documentation . 如果您使用的是1.1,则应参阅1.1文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM