Ticket #6969: 0001-slug_view.patch

File 0001-slug_view.patch, 887 bytes (added by ctrochalakis, 17 years ago)

slug_feed_v1

  • django/contrib/syndication/views.py

    From 371fdf3659a1c0e132edf7d037e5fee6a14bfb80 Mon Sep 17 00:00:00 2001
    From: Christos Trochalakis <yatiohi@ideopolis.gr>
    Date: Sat, 5 Apr 2008 18:58:09 +0300
    Subject: [PATCH] slug_view
    
    ---
     django/contrib/syndication/views.py |    5 +++++
     1 files changed, 5 insertions(+), 0 deletions(-)
    
    diff --git a/django/contrib/syndication/views.py b/django/contrib/syndication/views.py
    index 423d333..aa90f3c 100644
    a b def feed(request, url, feed_dict=None):  
    99        slug, param = url.split('/', 1)
    1010    except ValueError:
    1111        slug, param = url, ''
     12    return slug_feed(request, slug, param, feed_dict)
     13
     14def slug_feed(request, slug, param='', feed_dict=None):
     15    if not feed_dict:
     16        raise Http404, "No feeds are registered."
    1217
    1318    try:
    1419        f = feed_dict[slug]
Back to Top