In your urlpatterns, you are passing a string for the value of
feed_dict ("feeds").  You need to pass the actual dictionary object
that you setup for yourself:
...{ 'feed_dict' : feeds }

Cheers
-Brian

On Mar 2, 10:39 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> I try to create an RSS feed for my blog.
>
> I have in my application urls.py:
>
> from feeds import *
> feeds = { 'latest' : LatestEntries, }
>
> urlpatterns = patterns("",
>     [...],
>     (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
> {'feed_dict':'feeds'})
> )
>
> in feeds.py:
>
> from django.contrib.syndication.feeds import Feed
> from models import Entry
>
> class LatestEntries(Feed):
>      title = "X-Ray Golf Mike"
>      link = "/"
>      description = "Some description"
>
>      def items(self):
>          return Entry.objects.order_by("-creationDate")[:10]
>
> my Entry model has a proper string representation (def __unicode__ is
> present).
>
> Now I try to access my latest feed, resulting in an error.
>
> http://localhost:8000/blog/feeds/latest/:
>
> File "/Users/florian/dev/django/django/core/handlers/base.py" in
> get_response 82. response = callback(request, *callback_args,
> **callback_kwargs) File "/Users/florian/dev/django/django/contrib/
> syndication/views.py" in feed 14. f = feed_dict[slug] Exception Type:
> TypeError at /blog/feeds/latest/ Exception Value: string indices must
> be integers
>
> Anyone got an idea what is wrong with my code? I use the latest SVN
> checkout.
>
> Thanks,
>
> Florian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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