Ticket #7039: patch_feed_lang.diff

File patch_feed_lang.diff, 1.4 KB (added by caa, 16 years ago)

Fixed patch format and added documentation

  • django/contrib/syndication/feeds.py

     
    104104            subtitle = self.__get_dynamic_attr('subtitle', obj),
    105105            link = link,
    106106            description = self.__get_dynamic_attr('description', obj),
    107             language = settings.LANGUAGE_CODE.decode(),
     107            language = self.__get_dynamic_attr('language', obj) or settings.LANGUAGE_CODE.decode(),
    108108            feed_url = add_domain(current_site.domain,
    109109                                  self.__get_dynamic_attr('feed_url', obj)),
    110110            author_name = self.__get_dynamic_attr('author_name', obj),
  • docs/ref/contrib/syndication.txt

     
    332332
    333333Feeds created by the syndication framework automatically include the
    334334appropriate ``<language>`` tag (RSS 2.0) or ``xml:lang`` attribute (Atom). This
    335 comes directly from your :setting:`LANGUAGE_CODE setting`.
     335comes directly from your :setting:`LANGUAGE_CODE setting` unless you define a
     336``language`` method/attribute in your :class:`~django.contrib.syndication.feeds.Feed`
     337class.
    336338
    337339URLs
    338340----
Back to Top