I'm trying to get an understanding of the Feed Framework, so I've
created a simple application to try it out.  I have followed the steps
that are in the documentation but I'm getting the following error when
I go to this URL: "http://127.0.0.1:8000/feeds/news/":

AttributeError at /feeds/news/
'NoneType' object has no attribute 'startswith'

Here are my files:

feeds.py
########
from django.contrib.syndication.feeds import Feed
from news.models import News

class NewsFeed(Feed):
        '''Feed for latest 5 news entries'''
        title = "My news"
        link = "/sitenews/"
        description = "Updates on changes and additions to my news"

        def items(self):
                return News.objects.order_by('-submit_date')[:5]

urls.py
######
from django.conf.urls.defaults import *
from mysite.news.models import News
from news.feeds import *

site_feeds = {
        'news': NewsFeed,
}

news_info = {
        "queryset" : News.objects.all().order_by("-submit_date"),
}

urlpatterns = patterns('',
        (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
{'feed_dict': site_feeds}),
)

models.py
#########
class News(models.Model):
        title = models.CharField(max_length=50, db_index=True)
        submit_date = models.DateTimeField()
        story = models.TextField()

And I have two templates in a feeds folder under mysite/templates

news_title.html  ->  {{ obj.title }}
news_description.html  ->  {{ obj.story }}


I've looked over this several times and everything seems to be
correct.  Help!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to