2

I'm trying to set up the simple syndication example from the Django docs, in a working project. But I'm getting an ImportError, even though I'm sure I've copied the example exactly.

Here's what I have in feeds.py:

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

And here's what I have in urls.py:

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

But Django says it can't import the Feed class from django.contrib.syndication.views:

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

Any ideas? I'm baffled!

AP257
  • 89,519
  • 86
  • 202
  • 261

1 Answers1

2

That documentation is for the development version. Feeds have changed quite a lot in preparation for 1.2. If you're using 1.1, you should use the 1.1 docs.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895