Ticket #6188: feedview.patch
File feedview.patch, 732 bytes (added by , 17 years ago) |
---|
-
django/contrib/syndication/views.py
1 1 from django.contrib.syndication import feeds 2 2 from django.http import HttpResponse, Http404 3 3 4 def feed(request, url, feed_dict=None):4 def feed(request, slug, param='', feed_dict=None): 5 5 if not feed_dict: 6 6 raise Http404, "No feeds are registered." 7 7 8 8 try: 9 slug, param = url.split('/', 1)10 except ValueError:11 slug, param = url, ''12 13 try:14 9 f = feed_dict[slug] 15 10 except KeyError: 16 11 raise Http404, "Slug %r isn't registered." % slug