def feed_view(request, url, feed_dict=None):
 if (not feed_dict):
  raise django.http.Http404('No feeds are registered.')
 try:
  (slug, param) = url.split('/', 1)
 except ValueError:
  (slug, param) = (url, '')
 try:
  f = feed_dict[slug]
 except KeyError:
  raise django.http.Http404(("Slug %r isn't registered." % slug))
 try:
  feedgen = f(slug, request).get_feed(param)
 except views.FeedDoesNotExist:
  raise django.http.Http404(('Invalid feed parameters. Slug %r is valid, but other parameters, or lack thereof, are not.' % slug))
 response = django.http.HttpResponse(mimetype=feedgen.mime_type)
 feedgen.write(response, 'utf-8')
 return response

def feed_view ( request , url , feed_dict = None ) : if ( not feed_dict ) : raise django . http . Http404 ( 'No feeds are registered.' ) try : ( slug , param ) = url . split ( '/' , 1 ) except ValueError : ( slug , param ) = ( url , '' ) try : f = feed_dict [ slug ] except KeyError : raise django . http . Http404 ( ( "Slug %r isn't registered." % slug ) ) try : feedgen = f ( slug , request ) . get_feed ( param ) except views . FeedDoesNotExist : raise django . http . Http404 ( ( 'Invalid feed parameters. Slug %r is valid, but other parameters, or lack thereof, are not.' % slug ) ) response = django . http . HttpResponse ( mimetype = feedgen . mime_type ) feedgen . write ( response , 'utf-8' ) return response
view a feed .