2011-02-01 73 views
7

我能够获取rss源的输出,但项目链接中的域为http://example.com,而不是我在Feed.link中使用的域(http://www.mydomain.com/blog)。我需要做些什么来获得“mydomain.com”而不是“example.com”?Django RSS源已将域设置为example.com

下面是生成的RSS提要:

<?xml version="1.0" encoding="utf-8"?> 
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> 
<channel> 
<title>MyDomain Blog</title> 
<link>http://www.mydomain.com/blog</link> 
<description>insights and new developments in creating Pushstack</description> 
<atom:link href="http://example.com/blog/rss/" rel="self"></atom:link> 
<language>en-us</language> 
<lastBuildDate>Mon, 31 Jan 2011 19:41:42 -0000</lastBuildDate> 
<item> 
    <title>Example</title> 
    <link>http://example.com/blog/example</link> 
    <description></description> 
    <guid>http://example.com/blog/example</guid> 
</item> 
</channel> 
</rss> 

此外,在浏览器(OS X浏览器),它说, “NameError在/博客/ RSS /” 的称号。不知道这是否总是显示出来,或者是否有其他错误。

回答

0

这是正确的。如果您不使用管理员,也可以直接从“django_site”表中的DDBB更新它。

问候, 马丁

0

的原子:链接值默认为站点框架的信息,但你可以通过在饲料类中设置feed_link属性,将其覆盖如:

feed_link = "http://www.mydomain.com/blog/rss"