Ticket #1028: feeds_patch.diff

File feeds_patch.diff, 1.8 KB (added by Eric Abrahamsen, 16 years ago)
  • django/contrib/syndication/feeds.py

     
    88from django.utils.encoding import smart_unicode, iri_to_uri
    99from django.conf import settings         
    1010from django.template import RequestContext
     11from django import VERSION
    1112
    1213def add_domain(domain, url):
    1314    if not (url.startswith('http://') or url.startswith('https://')):
     
    9899       
    99100        link = self.__get_dynamic_attr('link', obj)
    100101        link = add_domain(current_site.domain, link)
    101 
     102       
     103        django_version = "Django version %s.%s" % (VERSION[0],VERSION[1])
     104       
    102105        feed = self.feed_type(
    103106            title = self.__get_dynamic_attr('title', obj),
    104107            subtitle = self.__get_dynamic_attr('subtitle', obj),
     108            generator = self.__get_dynamic_attr('generator', obj, default=django_version),
    105109            link = link,
    106110            description = self.__get_dynamic_attr('description', obj),
    107111            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),
    108119            feed_url = add_domain(current_site.domain,
    109120                                  self.__get_dynamic_attr('feed_url', obj)),
    110121            author_name = self.__get_dynamic_attr('author_name', obj),
Back to Top