Ticket #1028: feeds_patch.diff
File feeds_patch.diff, 1.8 KB (added by , 16 years ago) |
---|
-
django/contrib/syndication/feeds.py
8 8 from django.utils.encoding import smart_unicode, iri_to_uri 9 9 from django.conf import settings 10 10 from django.template import RequestContext 11 from django import VERSION 11 12 12 13 def add_domain(domain, url): 13 14 if not (url.startswith('http://') or url.startswith('https://')): … … 98 99 99 100 link = self.__get_dynamic_attr('link', obj) 100 101 link = add_domain(current_site.domain, link) 101 102 103 django_version = "Django version %s.%s" % (VERSION[0],VERSION[1]) 104 102 105 feed = self.feed_type( 103 106 title = self.__get_dynamic_attr('title', obj), 104 107 subtitle = self.__get_dynamic_attr('subtitle', obj), 108 generator = self.__get_dynamic_attr('generator', obj, default=django_version), 105 109 link = link, 106 110 description = self.__get_dynamic_attr('description', obj), 107 111 language = settings.LANGUAGE_CODE.decode(), 112 managing_editor = self.__get_dynamic_attr('managing_editor', obj), 113 webmaster = self.__get_dynamic_attr('webmaster', obj), 114 stylesheet = self.__get_dynamic_attr('stylesheet', obj,), 115 image = self.__get_dynamic_attr('image', obj), 116 cloud = self.__get_dynamic_attr('cloud', obj), 117 skip_hours = self.__get_dynamic_attr('skip_hours', obj), 118 skip_days = self.__get_dynamic_attr('skip_days', obj), 108 119 feed_url = add_domain(current_site.domain, 109 120 self.__get_dynamic_attr('feed_url', obj)), 110 121 author_name = self.__get_dynamic_attr('author_name', obj),