Ticket #6188: feedview.patch

File feedview.patch, 732 bytes (added by Guilherme M. Gondim (semente) <semente@…>, 17 years ago)
  • django/contrib/syndication/views.py

     
    11from django.contrib.syndication import feeds
    22from django.http import HttpResponse, Http404
    33
    4 def feed(request, url, feed_dict=None):
     4def feed(request, slug, param='', feed_dict=None):
    55    if not feed_dict:
    66        raise Http404, "No feeds are registered."
    77
    88    try:
    9         slug, param = url.split('/', 1)
    10     except ValueError:
    11         slug, param = url, ''
    12 
    13     try:
    149        f = feed_dict[slug]
    1510    except KeyError:
    1611        raise Http404, "Slug %r isn't registered." % slug
Back to Top