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
任何想法?我很困惑!
就是这样......谢谢。 – AP257 2010-04-08 19:56:42