Ticket #2912: pass_http_request.patch
File pass_http_request.patch, 1.4 KB (added by , 18 years ago) |
---|
-
django/contrib/syndication/feeds.py
old new 19 19 title_template = None 20 20 description_template = None 21 21 22 def __init__(self, slug, feed_url):22 def __init__(self, slug, request): 23 23 self.slug = slug 24 self.feed_url = feed_url 24 self.feed_url = request.path 25 self.request = request 25 26 self.title_template_name = self.title_template or ('feeds/%s_title.html' % slug) 26 27 self.description_template_name = self.description_template or ('feeds/%s_description.html' % slug) 27 28 -
django/contrib/syndication/views.py
old new 16 16 raise Http404, "Slug %r isn't registered." % slug 17 17 18 18 try: 19 feedgen = f(slug, request .path).get_feed(param)19 feedgen = f(slug, request).get_feed(param) 20 20 except feeds.FeedDoesNotExist: 21 21 raise Http404, "Invalid feed parameters. Slug %r is valid, but other parameters, or lack thereof, are not." % slug 22 22