Django简单联合示例给出:ImportError,无法导入名称Feed

问题描述:

我试图在工作项目中设置来自Django文档的simple syndication example。但是我得到一个ImportError,尽管我确定我已经完全复制了这个例子。Django简单联合示例给出:ImportError,无法导入名称Feed

下面是我在feeds.py:

from django.contrib.syndication.views import Feed 
class LatestEntriesFeed(Feed): 
    # etc 

这里就是我在urls.py:

from election.feeds import LatestEntriesFeed 
#... further down, at the appropriate line... 
    # RSS feed 
    (r'^feed/$', LatestEntriesFeed()), 

但Django的说,它无法从Django中导入Feed类.contrib.syndication.views:

ImportError at /feed/ 
cannot import name Feed 
....feeds.py in <module> 
from django.contrib.syndication.views import Feed 

任何想法?我很困惑!

该文档适用于开发版本。为1.2准备饲料已经发生了很大的变化。如果你使用1.1,你应该使用the 1.1 docs

+0

就是这样......谢谢。 – AP257 2010-04-08 19:56:42