Fixed #9555: respect the `feed_url` feed parameter. Thanks, sedden.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2009-04-07 20:29:33 +00:00
parent 752cc49a62
commit 710dfea913
1 changed files with 2 additions and 1 deletions

View File

@ -23,13 +23,14 @@ class Feed(object):
item_pubdate = None item_pubdate = None
item_enclosure_url = None item_enclosure_url = None
feed_type = feedgenerator.DefaultFeed feed_type = feedgenerator.DefaultFeed
feed_url = None
title_template = None title_template = None
description_template = None description_template = None
def __init__(self, slug, request): def __init__(self, slug, request):
self.slug = slug self.slug = slug
self.request = request self.request = request
self.feed_url = request.path self.feed_url = self.feed_url or request.path
self.title_template_name = self.title_template or ('feeds/%s_title.html' % slug) self.title_template_name = self.title_template or ('feeds/%s_title.html' % slug)
self.description_template_name = self.description_template or ('feeds/%s_description.html' % slug) self.description_template_name = self.description_template or ('feeds/%s_description.html' % slug)