Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1294 closed enhancement (invalid)

RSS framework doesn't pick up item_author_name

Reported by: jaanus@… Owned by: Adrian Holovaty
Component: Testing framework Version: new-admin
Severity: blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



class LatestFeed(Feed):
    title = 'Chat feed title'
    link = ''
    description = 'Chat feed'
    def get_object(self, bits):
        if len(bits) != 1:
            raise ObjectDoesNotExist
        return chats.get_object(name__exact=bits[0])
    def items(self, obj):
        return messages.get_list(, order_by=('-timestamp',), limit=50)
    def item_pubdate(self, item):
        return item.timestamp
    def item_author_name(self, item):
        return item.from_dispname


  <title>title is fine here</title> 
  <description>here's some text</description> 
  <pubDate>Fri, 27 Jan 2006 15:15:58 -0000</pubDate> 

no trace of author in the output???

Change History (4)

comment:1 Changed 13 years ago by k.shaposhnikov@…

This is because of following code in (Rss201rev2Feed class):

            # Author information.
            if item['author_email'] is not None and item['author_name'] is not None:
                handler.addQuickElement(u"author", u"%s (%s)" % \
                    (item['author_email'], item['author_name']))

As you can see you should specify both author_email and author_name for your item, at least if you want to generate RSS 2.0 feed.

I am not sure what is the best way to fix it, so I won't provide patch.

RSS specification ( describes behavior that implemented in Django. But probably it is valid if author element contains only name or only email.

comment:2 Changed 13 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Django follows the spec, so I'm marking this as invalid.

comment:3 Changed 12 years ago by anonymous

Component: RSS frameworkUnit test system
milestone: Version 1.1
priority: normallowest
Severity: normalblocker
Type: defectenhancement
Version: SVNnew-admin

comment:4 Changed 12 years ago by (none)

Milestone Version 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top